lib/active_merchant/billing/gateways/redsys.rb in activemerchant-1.103.0 vs lib/active_merchant/billing/gateways/redsys.rb in activemerchant-1.104.0
- old
+ new
@@ -34,19 +34,19 @@
# specify the key/value :signature_algorithm => "sha256" to use the
# SHA256 method. Otherwise it will default to using the SHA1.
#
#
class RedsysGateway < Gateway
- self.live_url = 'https://sis.sermepa.es/sis/operaciones'
+ self.live_url = 'https://sis.redsys.es/sis/operaciones'
self.test_url = 'https://sis-t.redsys.es:25443/sis/operaciones'
self.supported_countries = ['ES']
self.default_currency = 'EUR'
self.money_format = :cents
# Not all card types may be activated by the bank!
- self.supported_cardtypes = [:visa, :master, :american_express, :jcb, :diners_club]
+ self.supported_cardtypes = [:visa, :master, :american_express, :jcb, :diners_club, :unionpay]
self.homepage_url = 'http://www.redsys.es/'
self.display_name = 'Redsys'
CURRENCY_CODES = {
'AED' => '784',
@@ -519,9 +519,10 @@
end
def currency_code(currency)
return currency if currency =~ /^\d+$/
raise ArgumentError, "Unknown currency #{currency}" unless CURRENCY_CODES[currency]
+
CURRENCY_CODES[currency]
end
def transaction_code(type)
SUPPORTED_TRANSACTIONS[type]