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

CyberSource Rest: Add the mcc field #5253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yunnydang
Copy link
Contributor

Adds the optional mcc field

Local:
6016 tests, 80320 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Unit:
40 tests, 217 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
54 tests, 177 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

@yunnydang yunnydang requested a review from a team September 6, 2024 22:42
@yunnydang yunnydang self-assigned this Sep 6, 2024
Copy link
Contributor

@jcreiff jcreiff left a comment

Choose a reason for hiding this comment

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

@yunnydang I think we will need to add this to cyber_source as well as cyber_source_rest

It also may require some additional wrangling on the Spreedly side if this adapter is expecting mcc to be nested in the three_d_secure block rather than options but we can discuss that further in another thread

@@ -138,6 +138,7 @@ def add_three_ds(post, payment_method, options)
post[:consumerAuthenticationInformation][:paSpecificationVersion] = three_d_secure[:version] if three_d_secure[:version]
post[:consumerAuthenticationInformation][:directoryServerTransactionID] = three_d_secure[:ds_transaction_id] if three_d_secure[:ds_transaction_id]
post[:consumerAuthenticationInformation][:eciRaw] = three_d_secure[:eci] if three_d_secure[:eci]
post[:consumerAuthenticationInformation][:mcc] = options[:mcc] if options[:mcc]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey @jcreiff after our discussion I changed it to be be pulling the mcc from the options object however would it pose any issue or concern if line 128 is still there? im thinking theres no point to send the mcc by itself if none of the rest of the threeds fields are there anyways but wanted to run it by you, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that guard clause should stay as is - the 3DS info is the main reason to enter this block of logic, and it doesn't seem like we want to entertain the option of only entering this method to add MCC.

However, this brings up a question about the requested use case that initiated this work, which I will follow up on in a separate thread

if options[:payer_auth_validate_service]
xml.tag! 'payerAuthValidateService', { 'run' => 'true' } do
xml.tag! 'signedPARes', options[:pares]
xml.tag! 'signedPARes', options[:pares] if options[:pares]
Copy link
Contributor

Choose a reason for hiding this comment

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

Any particular reason to add this? I think it should be reliably included in options based on the way we communicate these details from the Spreedly side

@@ -138,6 +138,7 @@ def add_three_ds(post, payment_method, options)
post[:consumerAuthenticationInformation][:paSpecificationVersion] = three_d_secure[:version] if three_d_secure[:version]
post[:consumerAuthenticationInformation][:directoryServerTransactionID] = three_d_secure[:ds_transaction_id] if three_d_secure[:ds_transaction_id]
post[:consumerAuthenticationInformation][:eciRaw] = three_d_secure[:eci] if three_d_secure[:eci]
post[:consumerAuthenticationInformation][:mcc] = options[:mcc] if options[:mcc]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that guard clause should stay as is - the 3DS info is the main reason to enter this block of logic, and it doesn't seem like we want to entertain the option of only entering this method to add MCC.

However, this brings up a question about the requested use case that initiated this work, which I will follow up on in a separate thread

Copy link

To provide a cleaner slate for the maintenance of the library, this PR/Issue is being labeled stale after 60 days without activity. It will be closed in 14 days unless you comment with an update regarding its applicability to the current build. Thank you!

@github-actions github-actions bot added the Stale label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants