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

Paymentez: Read messages on Failure with no error #2850

Merged
merged 1 commit into from
May 18, 2018
Merged

Paymentez: Read messages on Failure with no error #2850

merged 1 commit into from
May 18, 2018

Conversation

nfarve
Copy link

@nfarve nfarve commented May 18, 2018

Extends parsing messages on failure. Messages can be returned that are not included in the error
field.

Loaded suite test/unit/gateways/paymentez_test
................

16 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Loaded suite test/remote/gateways/remote_paymentez_test
................

16 tests, 39 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

@nfarve
Copy link
Author

nfarve commented May 18, 2018

I was unable to reproduce the error with a card with an old year, so I think expired here means something different. Thats why only the unit test.

if response['error']
response['error'] && response['error']['type']
else
response['transaction']['message']
Copy link
Contributor

@curiousepic curiousepic May 18, 2018

Choose a reason for hiding this comment

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

It might be worth considering concatenating "transaction_message: error_type" in this case, which we do for some other gateways. Unless we know there is no transaction message if there is an error.

Copy link
Author

Choose a reason for hiding this comment

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

Might be misunderstanding, but it looks like its one or the other. We get back an error or a transaction.

Copy link
Contributor

@curiousepic curiousepic left a comment

Choose a reason for hiding this comment

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

👍

Extends parsing messages on failure. Messages can be returned that are not included in the error
field.

Loaded suite test/unit/gateways/paymentez_test
................

16 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Loaded suite test/remote/gateways/remote_paymentez_test
................

16 tests, 39 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
@nfarve nfarve merged commit e06b213 into master May 18, 2018
@nfarve nfarve deleted the enrg_7476 branch May 18, 2018 19:02
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