Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request activemerchant#940 from radar/pin-gateway-name
Browse files Browse the repository at this point in the history
[pin] Use CreditCard#name
  • Loading branch information
odorcicd committed Dec 6, 2013
2 parents bbbc1fe + 1893f38 commit dd80d0b
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/pin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def add_creditcard(post, creditcard)
:expiry_month => creditcard.month,
:expiry_year => creditcard.year,
:cvc => creditcard.verification_value,
:name => "#{creditcard.first_name} #{creditcard.last_name}"
:name => creditcard.name
)
elsif creditcard.kind_of?(String)
if creditcard =~ /^card_/
Expand Down
2 changes: 1 addition & 1 deletion test/unit/gateways/pin_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def test_add_creditcard
assert_equal @credit_card.month, post[:card][:expiry_month]
assert_equal @credit_card.year, post[:card][:expiry_year]
assert_equal @credit_card.verification_value, post[:card][:cvc]
assert_equal "#{@credit_card.first_name} #{@credit_card.last_name}", post[:card][:name]
assert_equal @credit_card.name, post[:card][:name]
end

def test_add_creditcard_with_card_token
Expand Down

0 comments on commit dd80d0b

Please sign in to comment.