lib/active_merchant/billing/gateways/conekta.rb in activemerchant-1.42.5 vs lib/active_merchant/billing/gateways/conekta.rb in activemerchant-1.42.6
- old
+ new
@@ -35,20 +35,20 @@
post[:capture] = false
commit(:post, "charges", post)
end
- def capture(identifier, money, options = {})
+ def capture(money, identifier, options = {})
post = {}
post[:order_id] = identifier
add_order(post, money, options)
commit(:post, "charges/#{identifier}/capture", post)
end
- def refund(identifier, money, options)
+ def refund(money, identifier, options)
post = {}
post[:order_id] = identifier
add_order(post, money, options)
@@ -75,11 +75,12 @@
end
private
def add_order(post, money, options)
- post[:description] = options[:description]
+ post[:description] = options[:description] || "Active Merchant Purchase"
post[:reference_id] = options[:order_id]
+ post[:currency] = (options[:currency] || currency(money)).downcase
post[:amount] = amount(money)
end
def add_details_data(post, options)
details = {}