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: Add apple_pay params for discover if flag passed #5213

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

DustinHaefele
Copy link
Contributor

No description provided.


xml.tag! 'ccAuthService', { 'run' => 'true' } do
xml.tag!('cavv', payment_method.payment_cryptogram) unless commerce_indicator
xml.commerceIndicator commerce_indicator.nil? ? ECI_BRAND_MAPPING[brand] : commerce_indicator

Choose a reason for hiding this comment

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

Do we also want to pass options[:reconciliation_id]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I don't think so. That is noted in the visa docs, but not the discover docs.

return unless options[:enable_cybs_discover_apple_pay]

xml.tag! 'ccAuthService', { 'run' => 'true' } do
xml.tag!('cavv', payment_method.payment_cryptogram) unless commerce_indicator
Copy link

Choose a reason for hiding this comment

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

with the underlying data, what will the commerce indicator actually be.. the non Network tokenization PB or the DIPB ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on line 911 the commerce_indicator will be internet in the case of network tokenization and it will be pb for non-network tokenization

Copy link

Choose a reason for hiding this comment

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

in the cybersource docs, its seems DIPB is what is required in this context
https://developer.cybersource.com/content/dam/docs/cybs/en-us/apple-pay/developer/smartpay/so/applepay.pdf
image

Copy link

@klumsy klumsy Aug 14, 2024

Choose a reason for hiding this comment

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

Based on line 911 the commerce_indicator will be internet in the case of network tokenization and it will be pb for non-network tokenization

i think that code is only for SUBSEQUENT, when its merchant initiated follow up. as a way to do recurring.. i think the other code earlier (line 902) has the logic the other way 'internet' for regular, and 'pb' for network tokenization

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@klumsy

Yes the 902 code is for pure network tokens, and not related to apple_pay, that is differentiated in add_auth_service around line 795.

This is also a little confusing because in the example, as you posted, it shows dipb. But in the actual definition of required elements it says it should be internet. I think I am going to go with internet in this case since it is written more explicitly in the docs.

image

@DustinHaefele DustinHaefele merged commit 5084609 into master Aug 21, 2024
5 checks passed
@DustinHaefele DustinHaefele deleted the cybs-apple-pay-discover branch August 21, 2024 18:24
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.

3 participants