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

GlobalCollect: Fix bug in success_from logic #4939

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

DustinHaefele
Copy link
Contributor

Some apple_pay transactions that were through global collect direct (ogone) were being marked as failed despite success. The response from direct was slightly different than the standard global collect so the logic wasn't seeing them as successful.

Spreedly reference ticket: ECS-3197
remote tests:
54 tests, 141 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

unit tests:
45 tests, 230 assertions, 0 failures, 0 errors, 0 pending, 0 omissions, 0 notifications 100% passed
1497.80 tests/s, 7655.44 assertions/s

@DustinHaefele DustinHaefele requested a review from a team October 31, 2023 17:21
@DustinHaefele DustinHaefele force-pushed the worldline-collect-apple-pay-bug branch 2 times, most recently from db3a96a to 064bd5a Compare October 31, 2023 17:39
@@ -522,8 +522,6 @@ def content_type
def success_from(action, response)
return false if response['errorId'] || response['error_message']

return %w(CAPTURED CAPTURE_REQUESTED).include?(response.dig('payment', 'status')) if response.dig('payment', 'paymentOutput', 'paymentMethod') == 'mobile'

Choose a reason for hiding this comment

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

Great catch, I was so confused about this one.

@DustinHaefele DustinHaefele force-pushed the worldline-collect-apple-pay-bug branch 2 times, most recently from 1c8c370 to 3a909a2 Compare November 7, 2023 15:05
Some applepay transactions that were through global collect direct (ogone)
were being marked as failed despite success. The response from direct was
slightly different than the standard global collect so the logic wasn't seeing
them as successful.

Spreedly reference ticket: ECS-3197
remote tests:
55 tests, 144 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
0.78 tests/s, 2.05 assertions/s

unit tests:
45 tests, 230 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
1497.80 tests/s, 7655.44 assertions/s
@DustinHaefele DustinHaefele merged commit 330f0b9 into master Nov 7, 2023
5 checks passed
@DustinHaefele DustinHaefele deleted the worldline-collect-apple-pay-bug branch November 7, 2023 20: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