From 88df927ae7d2dec83b2ea200162ebe9875eb1e9d Mon Sep 17 00:00:00 2001 From: R D I P Devinda Date: Thu, 22 Aug 2019 22:10:35 +0530 Subject: [PATCH 1/3] Update bit_pay.rb in the bitpay api it mentioned, [DEPRECATED] use `orderId` instead --- lib/offsite_payments/integrations/bit_pay.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/offsite_payments/integrations/bit_pay.rb b/lib/offsite_payments/integrations/bit_pay.rb index 5adb09b8a..7691ca5ad 100644 --- a/lib/offsite_payments/integrations/bit_pay.rb +++ b/lib/offsite_payments/integrations/bit_pay.rb @@ -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', From c4c0cf57843cfc090649dd92e316987f88c66263 Mon Sep 17 00:00:00 2001 From: R D I P Devinda Date: Thu, 22 Aug 2019 22:18:31 +0530 Subject: [PATCH 2/3] Update bit_pay_helper_test.rb --- test/unit/integrations/bit_pay/bit_pay_helper_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/integrations/bit_pay/bit_pay_helper_test.rb b/test/unit/integrations/bit_pay/bit_pay_helper_test.rb index 866418598..7a9ec2387 100644 --- a/test/unit/integrations/bit_pay/bit_pay_helper_test.rb +++ b/test/unit/integrations/bit_pay/bit_pay_helper_test.rb @@ -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 @@ -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, @@ -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, From bd139c05cfeb422dcde3042f2581d8f3897a2deb Mon Sep 17 00:00:00 2001 From: R D I P Devinda Date: Thu, 22 Aug 2019 22:19:49 +0530 Subject: [PATCH 3/3] Update bit_pay_notification_test.rb --- test/unit/integrations/bit_pay/bit_pay_notification_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/integrations/bit_pay/bit_pay_notification_test.rb b/test/unit/integrations/bit_pay/bit_pay_notification_test.rb index 9ad29a841..a920ecb57 100644 --- a/test/unit/integrations/bit_pay/bit_pay_notification_test.rb +++ b/test/unit/integrations/bit_pay/bit_pay_notification_test.rb @@ -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",