lib/active_merchant/billing/gateways/blue_snap.rb in activemerchant-1.77.0 vs lib/active_merchant/billing/gateways/blue_snap.rb in activemerchant-1.78.0

- old
+ new

@@ -84,11 +84,11 @@ end def refund(money, authorization, options={}) commit(:refund, :put) do |doc| add_authorization(doc, authorization) - add_amount(doc, money) + add_amount(doc, money, options) add_order(doc, options) end end def void(authorization, options={}) @@ -138,11 +138,11 @@ private def add_auth_purchase(doc, money, payment_method, options) doc.send("recurring-transaction", options[:recurring] ? "RECURRING" : "ECOMMERCE") add_order(doc, options) - add_amount(doc, money) + add_amount(doc, money, options) doc.send("transaction-fraud-info") do doc.send("shopper-ip-address", options[:ip]) if options[:ip] end if payment_method.is_a?(String) @@ -153,11 +153,11 @@ end add_credit_card(doc, payment_method) end end - def add_amount(doc, money) + def add_amount(doc, money, options) doc.amount(amount(money)) doc.currency(options[:currency] || currency(money)) end def add_personal_info(doc, credit_card, options) @@ -199,14 +199,9 @@ doc.country(address[:country]) if address[:country] doc.state(address[:state]) if address[:state] doc.address(address[:address]) if address[:address] doc.city(address[:city]) if address[:city] doc.zip(address[:zip]) if address[:zip] - end - - def add_invoice(post, money, options) - post[:amount] = amount(money) - post[:currency] = (options[:currency] || currency(money)) end def add_authorization(doc, authorization) doc.send("transaction-id", authorization) end