Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible use of transactionReference with Purchase #22

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

More flexible use of transactionReference with Purchase #22

wants to merge 3 commits into from

Conversation

lukeholder
Copy link

@lukeholder lukeholder commented Feb 19, 2018

Fixes #21

@@ -72,7 +72,8 @@ class PurchaseRequest extends AuthorizeRequest

public function getData()
{
if ($this->parameters->get('transactionReference')) {
$realCardExists = ($this->getCard() || $this->getCardReference());
if ($this->parameters->get('transactionReference') && !$realCardExists) {
Copy link
Contributor

@RobvH RobvH Feb 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukeholder simple enough. I'm curious how the expectation here failed.

The original condition is meant to differentiate between a case of a reference sale or card sale. According to this change, checking for card data is needed to truly make that determination. Seems odd, so I'm curious what you're using the transaction reference field for in a card sale...

In all other cases throughout the API (eg. voiding, etc) transaction reference === the ORIGID. Can you show me what you're doing with this field? I'm thinking it shouldn't be there, but I'd like to know if it has a valid use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants