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: Support NT #5107

Merged
merged 5 commits into from May 3, 2024
Merged

Cybersource Rest: Support NT #5107

merged 5 commits into from May 3, 2024

Conversation

aenand
Copy link
Contributor

@aenand aenand commented Apr 24, 2024

COMP-75

Adds support for Network Tokens on the Cybersource Rest gateway.

Test Summary
Local:
5848 tests, 79228 assertions, 0 failures, 23 errors, 0 pendings, 0 omissions, 0 notifications 99.6067% passed
Errors unrelated to this gateway
Unit:
32 tests, 160 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
Remote:
50 tests, 157 assertions, 7 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 86% passed
Errors also on master

@aenand aenand requested a review from a team April 24, 2024 17:45
@@ -187,6 +203,34 @@ def test_add_shipping_address
assert_equal '4158880000', address[:phoneNumber]
end

def test_authorize_network_token_visa

Choose a reason for hiding this comment

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

I know these tickets aren't together but could you please add tests for stored credentials just to ensure that we are properly sending all the fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's another PR to update the stored credential mappings!

@@ -191,25 +196,31 @@ def add_payment(post, payment, options)
end

def add_network_tokenization_card(post, payment, options)
post[:processingInformation][:paymentSolution] = PAYMENT_SOLUTION[payment.source]
post[:processingInformation][:commerceIndicator] = 'internet' unless card_brand(payment) == 'jcb'

Choose a reason for hiding this comment

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

commerceIndicator needs to be updated base on stored_credentials

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's another PR that updates this value!

else
post[:consumerAuthenticationInformation] = { cavv: payment.payment_cryptogram }
# Apple Pay / Google Pay
post[:processingInformation][:paymentSolution] = WALLET_PAYMENT_SOLUTION[payment.source]

Choose a reason for hiding this comment

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

Just to re-verify, it's necessary for us to send cryptogram in two different places for ApplePay & GooglePay?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For rest, yes!

@@ -93,6 +98,7 @@ def scrub(transcript)
gsub(/(\\?"number\\?":\\?")\d+/, '\1[FILTERED]').
gsub(/(\\?"routingNumber\\?":\\?")\d+/, '\1[FILTERED]').
gsub(/(\\?"securityCode\\?":\\?")\d+/, '\1[FILTERED]').
gsub(/(\\?"cryptogram\\?":\\?")[^<]+/, '\1[FILTERED]').
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@almalee24 also added scrubbing of cryptogram and a test for it.

Choose a reason for hiding this comment

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

Got it, thanks for catching that!

aenand added 4 commits May 3, 2024 13:18
COMP-75

Adds support for Network Tokens on the Cybersource
Rest gateway.

Test Summary
Local:
5848 tests, 79228 assertions, 0 failures, 23 errors, 0 pendings, 0 omissions, 0 notifications
99.6067% passed
Errors unrelated to this gateway
Unit:
32 tests, 160 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
Remote:
50 tests, 157 assertions, 7 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
86% passed
Errors also on master
@aenand aenand force-pushed the cybersource_rest_network_token branch from 593b285 to f8281e3 Compare May 3, 2024 17:18
@aenand aenand merged commit 0faace6 into master May 3, 2024
0 of 5 checks passed
@aenand aenand deleted the cybersource_rest_network_token branch May 3, 2024 17:22
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.

None yet

2 participants