lib/active_merchant/billing/gateways/ebanx.rb in activemerchant-1.107.1 vs lib/active_merchant/billing/gateways/ebanx.rb in activemerchant-1.107.2
- old
+ new
@@ -35,10 +35,19 @@
refund: :post,
void: :get,
store: :post
}
+ VERIFY_AMOUNT_PER_COUNTRY = {
+ 'br' => 100,
+ 'ar' => 100,
+ 'co' => 100,
+ 'pe' => 300,
+ 'mx' => 300,
+ 'cl' => 5000
+ }
+
def initialize(options={})
requires!(options, :integration_key)
super
end
@@ -63,10 +72,11 @@
add_invoice(post, money, options)
add_customer_data(post, payment, options)
add_card_or_token(post, payment)
add_address(post, options)
add_customer_responsible_person(post, payment, options)
+ add_additional_data(post, options)
post[:payment][:creditcard][:auto_capture] = false
commit(:authorize, post)
end
@@ -107,10 +117,10 @@
commit(:store, post)
end
def verify(credit_card, options={})
MultiResponse.run(:use_first_response) do |r|
- r.process { authorize(100, credit_card, options) }
+ r.process { authorize(VERIFY_AMOUNT_PER_COUNTRY[customer_country(options)], credit_card, options) }
r.process(:ignore_result) { void(r.authorization, options) }
end
end
def supports_scrubbing?