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

SafeCharge: Change Verify to send 0 amount #4332

Merged
merged 1 commit into from
Feb 23, 2022

Conversation

dsmcclain
Copy link
Contributor

Also updates tests to reflect new verify flow.

CE-190

Rubocop:
728 files inspected, no offenses detected

Unit:
5068 tests, 75098 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
Loaded suite test/remote/gateways/remote_safe_charge_test
30 tests, 83 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Also updates tests to reflect new `verify` flow.

CE-190

Rubocop:
728 files inspected, no offenses detected

Unit:
5068 tests, 75098 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
Loaded suite test/remote/gateways/remote_safe_charge_test
30 tests, 83 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
@dsmcclain dsmcclain requested a review from a team February 22, 2022 17:23
assert !response.params['acsurl'].blank?
assert !response.params['pareq'].blank?
assert !response.params['xid'].blank?
assert_equal 'Attempted But Card Not Enrolled', response.params['threedreason']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fix is for a failing remote test unrelated to the verify changes.

This test covers a case where a 3ds transaction returns a Payer Response (pa_res) indicating that the 3ds flow has been rejected.

Quoted from Nuvei/SafeCharge's Gateway Direct API Integration Guide:

If the customer's card is not enrolled in 3D Secure, SafeCharge returns the regular Gateway parameters...and in addition the parameters ECI and ThreeDReason.

Based on this, the acsurl, pareq, and xid fields should not have a value for this particular response.

Copy link
Contributor

@therufs therufs left a comment

Choose a reason for hiding this comment

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

lgtm; tests && cops pass!

@dsmcclain dsmcclain merged commit 034379f into master Feb 23, 2022
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