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: include networkTokenCryptogram in ccAuthService for MC #4834

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

Conversation

bbraschi
Copy link
Collaborator

@bbraschi bbraschi commented Jul 19, 2023

Cybersource requires that the network token cryptogram is provided under the ccAuthService element. This PR adds it. Note this is redundant with authenticationData under the ucaf element.

See Cybersource's Authorizations with Payment Network Tokens and CyberSourceTransaction_1.211.xsd, as per Cybersource's Using XML documentation.

Unit tests

bundle exec rake test:units TEST=test/unit/gateways/cyber_source_test.rb

132 tests, 628 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote tests

Same outcome on master and on the PR's branch

bundle exec rake test:remote TEST=test/remote/gateways/remote_cyber_source_test.rb

121 tests, 506 assertions, 36 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
70.2479% passed

@bbraschi bbraschi self-assigned this Jul 19, 2023
@@ -813,6 +813,7 @@ def add_auth_network_tokenization(xml, payment_method, options)
xml.tag!('collectionIndicator', DEFAULT_COLLECTION_INDICATOR)
end
xml.tag! 'ccAuthService', { 'run' => 'true' } do
xml.tag!('networkTokenCryptogram', payment_method.payment_cryptogram) if payment_method.payment_cryptogram
Copy link
Contributor

Choose a reason for hiding this comment

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

You mention that Visa requires this but the ccAuthService tag is only used for Mastercards. Visa cards have the cryptogram added to the ccAuthService.cavv field

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hello and TY @aenand! I corrected the description (Visa -> Cybersource). I meant to express that we got feedback, from Cybersource, asking that the network token cryptogram is provided under the ccAuthService.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah that makes more sense! I'll take a look at this Monday.

Copy link
Collaborator Author

@bbraschi bbraschi Jul 21, 2023

Choose a reason for hiding this comment

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

TY! The PR is still in draft - I am confused by the fact the cryptogram we be provided twice in the same request.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah that is strange 🤔 do you have a contact to reach out to at CyberSource?

@curiousepic
Copy link
Contributor

Marking this "of interest" before a cleanup of stale PRs

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