Skip to content

Commit

Permalink
EBANX: Change amount for Mexico and Chile
Browse files Browse the repository at this point in the history
Merchants using Ebanx are seeing transactions being denied at the card verify flow due to the minimum amount expected in this type of transaction. Increase the value to be accepted by the acquirers in the card verify flow. When using local currencies we end up doing the verify using the local currency, and in those cases 100 may be less than the minimum value for a valid transaction in some countries.

Remote:
26 tests, 70 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.1538% passed

Unit:
5069 tests, 75101 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Rubocop:
728 files inspected, no offenses detected

Closes #4337
  • Loading branch information
Flaaviaa authored and meagabeth committed Mar 18, 2022
1 parent 415fb2f commit 1707c06
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* Litle: Translate google_pay as android_pay [javierpedrozaing] #4331
* Braintree: Add ACH support for store [cristian] #4285
* Simetrik: Add support for Simetrik gateway [simetrik-frank] #4339
* EBANX: Change amount for Mexico and Chile [flaaviaa] #4337

== Version 1.125.0 (January 20, 2022)
* Wompi: support gateway [therufs] #4173
Expand Down
4 changes: 2 additions & 2 deletions lib/active_merchant/billing/gateways/ebanx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class EbanxGateway < Gateway
'ar' => 100,
'co' => 100,
'pe' => 300,
'mx' => 300,
'cl' => 5000
'mx' => 2000,
'cl' => 80000
}

def initialize(options = {})
Expand Down
20 changes: 20 additions & 0 deletions test/remote/gateways/remote_ebanx_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,26 @@ def test_successful_verify_for_chile
assert_match %r{Accepted}, response.message
end

def test_successful_verify_for_mexico
options = @options.merge({
order_id: generate_unique_id,
ip: '127.0.0.1',
email: '[email protected]',
birth_date: '10/11/1980',
billing_address: address({
address1: '1040 Rua E',
city: 'Toluca de Lerdo',
state: 'MX',
zip: '29269',
country: 'MX',
phone_number: '8522847035'
})
})
response = @gateway.verify(@credit_card, options)
assert_success response
assert_match %r{Accepted}, response.message
end

def test_failed_verify
response = @gateway.verify(@declined_card, @options)
assert_failure response
Expand Down

0 comments on commit 1707c06

Please sign in to comment.