lib/active_merchant/billing/gateways/maxipago.rb in activemerchant-1.61.0 vs lib/active_merchant/billing/gateways/maxipago.rb in activemerchant-1.62.0
- old
+ new
@@ -35,11 +35,11 @@
def capture(money, authorization, options = {})
commit(:capture) do |xml|
add_order_id(xml, authorization)
add_reference_num(xml, options)
xml.payment do
- add_amount(xml, money)
+ add_amount(xml, money, options)
end
end
end
def void(authorization, options = {})
@@ -52,11 +52,11 @@
def refund(money, authorization, options = {})
commit(:return) do |xml|
add_order_id(xml, authorization)
add_reference_num(xml, options)
xml.payment do
- add_amount(xml, money)
+ add_amount(xml, money, options)
end
end
end
def verify(creditcard, options = {})
@@ -161,21 +161,22 @@
xml.cvvNumber(creditcard.verification_value)
end
end
end
xml.payment do
- add_amount(xml, money)
+ add_amount(xml, money, options)
add_installments(xml, options)
end
add_billing_address(xml, creditcard, options)
end
def add_reference_num(xml, options)
xml.referenceNum(options[:order_id] || generate_unique_id)
end
- def add_amount(xml, money)
+ def add_amount(xml, money, options)
xml.chargeTotal(amount(money))
+ xml.currencyCode(options[:currency] || currency(money) || default_currency)
end
def add_processor_id(xml)
if test?
xml.processorID(1)