Skip to content

Commit

Permalink
IPG: Remove Uruguay from supported countries (#4311)
Browse files Browse the repository at this point in the history
Removed `uruguay` from supported countries along with its currency code
and test case changes in ipg implementation.

CE-2374

Unit:
5057 tests, 75059 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Rubocop:
728 files inspected, no offenses detected

Remote:
17 tests, 53 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
  • Loading branch information
ajawadmirza authored Feb 10, 2022
1 parent 35941ec commit 363e4d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* DecidirPlus: Added `authorize`, `capture`, `void`, and `verify` methods [ajawadmirza] #4284
* Paymentez: Fix `authorize` to call `purchase` for otp flow [ajawadmirza] #4310
* Orbital: Indicate support for network tokenization [dsmcclain] #4309
* IPG: remove `uruguay` from supported countries [ajawadmirza] #4311

== Version 1.125.0 (January 20, 2022)
* Wompi: support gateway [therufs] #4173
Expand Down
3 changes: 1 addition & 2 deletions lib/active_merchant/billing/gateways/ipg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ class IpgGateway < Gateway
self.test_url = 'https://test.ipg-online.com/ipgapi/services'
self.live_url = 'https://www5.ipg-online.com'

self.supported_countries = %w(UY AR)
self.supported_countries = %w(AR)
self.default_currency = 'ARS'
self.supported_cardtypes = %i[visa master american_express discover]

self.homepage_url = 'https://www.ipg-online.com'
self.display_name = 'IPG'

CURRENCY_CODES = {
'UYU' => '858',
'ARS' => '032'
}

Expand Down
4 changes: 2 additions & 2 deletions test/unit/gateways/ipg_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ def test_successful_verify

def test_successful_verify_with_currency_code
response = stub_comms do
@gateway.verify(@credit_card, { currency: 'UYU' })
@gateway.verify(@credit_card, { currency: 'ARS' })
end.check_request do |_endpoint, data, _headers|
doc = REXML::Document.new(data)
assert_match('858', REXML::XPath.first(doc, '//v1:Payment//v1:Currency').text) if REXML::XPath.first(doc, '//v1:CreditCardTxType//v1:Type')&.text == 'preAuth'
assert_match('032', REXML::XPath.first(doc, '//v1:Payment//v1:Currency').text) if REXML::XPath.first(doc, '//v1:CreditCardTxType//v1:Type')&.text == 'preAuth'
end.respond_with(successful_authorize_response, successful_void_response)
assert_success response
end
Expand Down

0 comments on commit 363e4d5

Please sign in to comment.