lib/active_merchant/billing/gateways/cenpos.rb in activemerchant-1.53.0 vs lib/active_merchant/billing/gateways/cenpos.rb in activemerchant-1.54.0
- old
+ new
@@ -49,10 +49,11 @@
post = {}
add_void_required_elements(post)
add_reference(post, authorization)
add_remembered_amount(post, authorization)
add_tax(post, options)
+ add_order_id(post, options)
commit("Void", post)
end
def refund(amount, authorization, options={})
@@ -93,13 +94,13 @@
private
def add_invoice(post, money, options)
post[:Amount] = amount(money)
post[:CurrencyCode] = options[:currency] || currency(money)
- post[:InvoiceNumber] = options[:order_id]
post[:InvoiceDetail] = options[:invoice_detail] if options[:invoice_detail]
post[:CustomerCode] = options[:customer_code] if options[:customer_code]
+ add_order_id(post, options)
add_tax(post, options)
end
def add_payment_method(post, payment_method)
post[:NameOnCard] = payment_method.name
@@ -122,9 +123,13 @@
end
def add_void_required_elements(post)
post[:GeoLocationInformation] = nil
post[:IMEI] = nil
+ end
+
+ def add_order_id(post, options)
+ post[:InvoiceNumber] = options[:order_id]
end
def add_tax(post, options)
post[:TaxAmount] = amount(options[:tax] || 0)
end