Skip to content

Commit

Permalink
[Gateways::Cybersource] Send tokenization data when card is :master (#…
Browse files Browse the repository at this point in the history
…3230)

Currently it will only send tokenization data for MasterCard when the card
type is :mastercard which is an invalid card type. This commit makes it
so it will send tokenization data when the card type is :master and not
:mastercard
  • Loading branch information
Pierre Nespo authored May 23, 2019
1 parent 791b762 commit 8a774dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/active_merchant/billing/gateways/cyber_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def add_auth_network_tokenization(xml, payment_method, options)
xml.tag!('commerceIndicator', 'vbv')
xml.tag!('xid', payment_method.payment_cryptogram)
end
when :mastercard
when :master
xml.tag! 'ucaf' do
xml.tag!('authenticationData', payment_method.payment_cryptogram)
xml.tag!('collectionIndicator', '2')
Expand Down
2 changes: 1 addition & 1 deletion test/unit/gateways/cyber_source_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def test_successful_auth_with_network_tokenization_for_mastercard
end.returns(successful_purchase_response)

credit_card = network_tokenization_credit_card('5555555555554444',
:brand => 'mastercard',
:brand => 'master',
:transaction_id => '123',
:eci => '05',
:payment_cryptogram => '111111111100cryptogram'
Expand Down

0 comments on commit 8a774dd

Please sign in to comment.