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

Braintree: Add sca_exemption #4864

Merged
merged 1 commit into from
Aug 24, 2023
Merged

Braintree: Add sca_exemption #4864

merged 1 commit into from
Aug 24, 2023

Conversation

almalee24
Copy link

To specifiy the SCA exemption that a trasaction will be claming.

Remote:
105 tests, 559 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed

Unit:
94 tests, 207 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed

@almalee24 almalee24 requested a review from a team August 18, 2023 18:29
@@ -673,6 +673,8 @@ def create_transaction_parameters(money, credit_card_or_vault_id, options)

add_3ds_info(parameters, options[:three_d_secure])

parameters[:sca_exemption] = options[:three_ds_exemption_type] if options[:three_ds_exemption_type]
Copy link
Contributor

Choose a reason for hiding this comment

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

There will likely be a set amount of standard exemption types across gateways. What if we standardize them inside the options[:three_d_secure] hash and then map them to the gateway's specific values kind of like STANDARD_ERROR_CODE

THREE_DS_EXEMPTIONS = {
  'low_value': 'low_value',
  'another_exemption': 'exemption_another'
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking around AM quite a few gateways look for something like options[:sca_exemption] so maybe we standardize on that field?

Copy link
Author

Choose a reason for hiding this comment

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

:sca_exemption is what we map for Adyen & Barclaycard and for Redsys is what the field the customer sends us. three_ds_exemption_type is the field that customer sends us but we map it on our side to be specific to the gateway.

Copy link
Contributor

Choose a reason for hiding this comment

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

the more you know!

Copy link
Contributor

@aenand aenand left a comment

Choose a reason for hiding this comment

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

:shipit: well done!

To specifiy the SCA exemption that a trasaction will be claming.

Remote:
105 tests, 559 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
94 tests, 207 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
@almalee24 almalee24 merged commit f6b99f1 into master Aug 24, 2023
5 checks passed
@almalee24 almalee24 deleted the braintree_sca_exemption branch August 24, 2023 16:36
This pull request was closed.
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