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
Conversation
@@ -187,6 +203,34 @@ def test_add_shipping_address | |||
assert_equal '4158880000', address[:phoneNumber] | |||
end | |||
|
|||
def test_authorize_network_token_visa |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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]'). |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
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
593b285
to
f8281e3
Compare
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