From 82515667d90320527dbbef027dc1fbf63b8a7d71 Mon Sep 17 00:00:00 2001 From: Mike Kelley Date: Mon, 14 Sep 2020 12:38:56 -0700 Subject: [PATCH 1/2] Updated verify_body to include currency_code For international credit cards locked to specific currencies you cannot verify with USD --- lib/spreedly/environment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spreedly/environment.rb b/lib/spreedly/environment.rb index 0a914c0..6c9eda3 100644 --- a/lib/spreedly/environment.rb +++ b/lib/spreedly/environment.rb @@ -185,7 +185,7 @@ def auth_purchase_body(amount, payment_method_token, options) def verify_body(payment_method_token, options) build_xml_request('transaction') do |doc| doc.payment_method_token(payment_method_token) - add_to_doc(doc, options, :retain_on_success) + add_to_doc(doc, options, :retain_on_success, :currency_code) add_extra_options_for_basic_ops(doc, options) end end From 6d563ab9c51dd87fcc5f44dd06ab037bf928b1c8 Mon Sep 17 00:00:00 2001 From: Mike Kelley Date: Mon, 14 Sep 2020 12:45:09 -0700 Subject: [PATCH 2/2] update tests --- test/unit/verify_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/verify_test.rb b/test/unit/verify_test.rb index 44d1596..c324620 100644 --- a/test/unit/verify_test.rb +++ b/test/unit/verify_test.rb @@ -59,7 +59,8 @@ def test_request_body_params [ './merchant_name_descriptor', 'TRain' ], [ './merchant_location_descriptor', 'British Colombia' ], [ './retain_on_success', 'true' ], - [ './continue_caching', 'true'] + [ './continue_caching', 'true'], + [ './currency_code', 'usd' ] end @@ -77,7 +78,8 @@ def all_possible_options merchant_name_descriptor: "TRain", merchant_location_descriptor: "British Colombia", retain_on_success: true, - continue_caching: true + continue_caching: true, + currency_code: 'usd' } end