lib/active_merchant/billing/gateways/moneris.rb in bitfluent-activemerchant-1.5.1.1 vs lib/active_merchant/billing/gateways/moneris.rb in bitfluent-activemerchant-1.15.1
- old
+ new
@@ -12,11 +12,11 @@
class MonerisGateway < Gateway
TEST_URL = 'https://esqa.moneris.com/gateway2/servlet/MpgRequest'
LIVE_URL = 'https://www3.moneris.com/gateway2/servlet/MpgRequest'
self.supported_countries = ['CA']
- self.supported_cardtypes = [:visa, :master, :american_express]
+ self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :discover]
self.homepage_url = 'http://www.moneris.com/'
self.display_name = 'Moneris'
# login is your Store ID
# password is your API Token
@@ -69,12 +69,16 @@
# number and order number be included. Concatenate your transaction
# number and order_id by using a semicolon (';'). This is to keep the
# Moneris interface consistent with other gateways. (See +capture+ for
# details.)
def credit(money, authorization, options = {})
- commit 'refund', crediting_params(authorization, :amount => amount(money))
+ deprecated CREDIT_DEPRECATION_MESSAGE
+ refund(money, authorization, options)
end
+ def refund(money, authorization, options = {})
+ commit 'refund', crediting_params(authorization, :amount => amount(money))
+ end
private # :nodoc: all
def expdate(creditcard)
sprintf("%.4i", creditcard.year)[-2..-1] + sprintf("%.2i", creditcard.month)
end