-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Adyen: Support preAuths and Synchronous Adjusts #3212
Adyen: Support preAuths and Synchronous Adjusts #3212
Conversation
Allows passing of authorisationType PreAuth to enable Adjusts to be made on Auths, and allows passing of adjustAuthorisationData from responses to support Synchronous Adjusts - this requires Adyen to set your account to Synchronous Adjust mode. Remote: 60 tests, 187 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Unit: 37 tests, 179 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
response['response'] == "[#{action}-received]" | ||
when 'adjustAuthorisation' | ||
response['response'] == 'Authorised' || response['response'] == '[adjustAuthorisation-received]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first condition is true for sync mode, the second for default/async.
@@ -174,6 +175,9 @@ def add_extra_data(post, payment, options) | |||
post[:additionalData][:overwriteBrand] = normalize(options[:overwrite_brand]) if options[:overwrite_brand] | |||
post[:additionalData][:customRoutingFlag] = options[:custom_routing_flag] if options[:custom_routing_flag] | |||
post[:additionalData]['paymentdatasource.type'] = NETWORK_TOKENIZATION_CARD_SOURCE[payment.source.to_s] if payment.is_a?(NetworkTokenizationCreditCard) | |||
post[:additionalData][:authorisationType] = options[:authorisation_type] if options[:authorisation_type] | |||
post[:additionalData][:adjustAuthorisationData] = options[:adjust_authorisation_data] if options[:adjust_authorisation_data] | |||
post[:additionalData][:RequestedTestAcquirerResponseCode] = options[:requested_test_acquirer_response_code] if options[:requested_test_acquirer_response_code] && test? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows us to explicitly invoke specific response codes; actually a pretty nice sandbox feature compared to others.
For async, is there a follow-up message after the received Adjust succeeds? 🤔 |
Not built-in. The same is true for refunds that are technically async; we still return the confirmation of receipt as a success. |
To clarify, Adyen does send a confirmation of finalization via their own notification/callback system, but we can't handle that in AM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Allows passing of authorisationType PreAuth to enable Adjusts to be made on Auths, and allows passing of adjustAuthorisationData from responses to support Synchronous Adjusts - this requires Adyen to set your account to Synchronous Adjust mode. Closes activemerchant#3212 Remote: 60 tests, 187 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Unit: 37 tests, 179 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
Allows passing of authorisationType PreAuth to enable Adjusts to be made
on Auths, and allows passing of adjustAuthorisationData from responses
to support Synchronous Adjusts - this requires Adyen to set your account
to Synchronous Adjust mode.
Remote:
60 tests, 187 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Unit:
37 tests, 179 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed