Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Updated verify_body to include currency_code #104

Open
wants to merge 2 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/spreedly/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions test/unit/verify_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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

Expand Down