Skip to content

Commit

Permalink
Merge pull request #321 from activemerchant/bitpay/add-token-to-invoi…
Browse files Browse the repository at this point in the history
…ce-payload

[Bitpay] Add token to payload while creating the invoice
  • Loading branch information
Pierre Nespo authored May 22, 2019
2 parents 677c124 + ca4a674 commit df57d21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/offsite_payments/integrations/bit_pay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def initialize(order_id, account, options)
add_field('posData', {'orderId' => order_id}.to_json)
add_field('fullNotifications', true)
add_field('transactionSpeed', 'high')
add_field('token', account)
end

mapping :amount, 'price'
Expand Down
2 changes: 2 additions & 0 deletions test/unit/integrations/bit_pay/bit_pay_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_calls_the_v1_api_url_when_the_token_is_v1
posData: { orderId: 1234 }.to_json,
fullNotifications: "true",
transactionSpeed: 'high',
token: @token_v1,
}.to_json
).to_return(
status: 200,
Expand All @@ -75,6 +76,7 @@ def test_calls_the_v2_api_url_when_the_token_is_v2
posData: { orderId: 1234 }.to_json,
fullNotifications: "true",
transactionSpeed: 'high',
token: @token_v2,
}.to_json
).to_return(
status: 200,
Expand Down

0 comments on commit df57d21

Please sign in to comment.