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

Update bit_pay.rb #332

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/offsite_payments/integrations/bit_pay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def initialize(order_id, account, options)
end

mapping :amount, 'price'
mapping :order, 'orderID'
mapping :order, 'orderId'
mapping :currency, 'currency'

mapping :customer, :first_name => 'buyerName',
Expand Down
6 changes: 3 additions & 3 deletions test/unit/integrations/bit_pay/bit_pay_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def setup
end

def test_basic_helper_fields
assert_field 'orderID', "1234"
assert_field 'orderId', "1234"
assert_field 'price', "500"
assert_field 'currency', 'USD'
end
Expand Down Expand Up @@ -51,7 +51,7 @@ def test_setting_invalid_address_field
def test_calls_the_v1_api_url_when_the_token_is_v1
stub_request(:post, BitPay::API_V1_URL).with(
body: {
orderID: '1234',
orderId: '1234',
price: '500',
currency: 'USD',
posData: { orderId: 1234 }.to_json,
Expand All @@ -71,7 +71,7 @@ def test_calls_the_v1_api_url_when_the_token_is_v1
def test_calls_the_v2_api_url_when_the_token_is_v2
stub_request(:post, BitPay::API_V2_URL).with(
body: {
orderID: '1234',
orderId: '1234',
price: '500',
currency: 'USD',
posData: { orderId: 1234 }.to_json,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_acknowledgement_error
def http_raw_data
{
"id"=> @invoice_id,
"orderID"=>"123",
"orderId"=>"123",
"url"=>"https://bitpay.com/invoice/98kui1gJ7FocK41gUaBZxG",
"status"=>"complete",
"btcPrice"=>"0.0295",
Expand Down