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

Add conditionals for optional fields to PxPay request #26

Merged
merged 8 commits into from
May 5, 2016
Merged

Add conditionals for optional fields to PxPay request #26

merged 8 commits into from
May 5, 2016

Conversation

gdhnz
Copy link
Contributor

@gdhnz gdhnz commented Apr 20, 2016

MerchantReference, TxnId, TxnData1, TxnData2, and TxnData3 are all optional fields so instead of sending empty strings if they're not set, don't include them in the request at all.

Copied the existing code for the 3 TxnData fields from PxPayAuthorizeRequest.php and added to PxPostAuthorizeRequest.php.
MerchantReference, TxnId, TxnData1, TxnData2, and TxnData3 are all optional fields so instead of sending empty strings if they're not set, don't include them in the request at all.
MerchantReference, TxnId, TxnData1, TxnData2, and TxnData3 are all optional fields so instead of sending empty strings if they're not set, don't include them in the request at all.
@gdhnz gdhnz closed this Apr 20, 2016
@gdhnz gdhnz deleted the pxpay-conditional branch April 20, 2016 20:42
@gdhnz
Copy link
Contributor Author

gdhnz commented Apr 20, 2016

When I branched, it already included my PxPost changes. Once the PxPost changes have been merged, I'll resubmit the PxPay changes. Sorry.

@gdhnz gdhnz restored the pxpay-conditional branch April 20, 2016 20:46
@gdhnz gdhnz reopened this Apr 26, 2016
@greydnls
Copy link
Contributor

@gdhnz thanks for this! Can you add some tests to cover it, please?

@gdhnz
Copy link
Contributor Author

gdhnz commented Apr 30, 2016

Is updating testCompletePurchaseWithTransactionDataSuccess in PxPayCompletePurchaseSuccess.php with additional response tests for TxnData1, TxnData2, and TxnData3 enough?

I can also add tests to testAuthorizeWithTransactionDataSuccess to check the request.

Tests added to testAuthorizeWithTransactionDataSuccess to check the request and to testCompletePurchaseWithTransactionDataSuccess to check the response.
Add PxPay test if cardReference, pxPostUsername, and pxPostPassword are set.
@delatbabel delatbabel merged commit 71f3b57 into thephpleague:master May 5, 2016
@delatbabel
Copy link
Contributor

Merged. Can someone please confirm that this works in production and then I will tag for release?

@gdhnz gdhnz deleted the pxpay-conditional branch May 5, 2016 02:22
@gdhnz
Copy link
Contributor Author

gdhnz commented May 5, 2016

I've confirmed this works in production.

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.

3 participants