Class: ActiveMerchant::Billing::MonerisGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::MonerisGateway
- Defined in:
- lib/active_merchant/billing/gateways/moneris.rb
Overview
To learn more about the Moneris gateway, please contact eselectplus@moneris.com for a copy of their integration guide. For information on remote testing, please see "Test Environment Penny Value Response Table", and "Test Environment eFraud (AVS and CVD) Penny Response Values", available at Moneris' eSelect Plus Documentation Centre.
Constant Summary
- TEST_URL =
'https://esqa.moneris.com/gateway2/servlet/MpgRequest'- LIVE_URL =
'https://www3.moneris.com/gateway2/servlet/MpgRequest'
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary (collapse)
-
- (Object) authorize(money, creditcard, options = {})
Referred to as "PreAuth" in the Moneris integration guide, this action verifies and locks funds on a customer's card, which then must be captured at a later date.
-
- (Object) capture(money, authorization, options = {})
This method retrieves locked funds from a customer's account (from a PreAuth) and prepares them for deposit in a merchant's account.
-
- (Object) credit(money, authorization, options = {})
Performs a refund.
-
- (MonerisGateway) initialize(options = {})
constructor
login is your Store ID password is your API Token.
-
- (Object) purchase(money, creditcard, options = {})
This action verifies funding on a customer's card, and readies them for deposit in a merchant's account.
- - (Object) refund(money, authorization, options = {})
- - (Boolean) test?
-
- (Object) void(authorization, options = {})
Voiding requires the original transaction ID and order ID of some open transaction.
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?
Methods included from CreditCardFormatting
Constructor Details
- (MonerisGateway) initialize(options = {})
login is your Store ID password is your API Token
23 24 25 26 27 |
# File 'lib/active_merchant/billing/gateways/moneris.rb', line 23 def initialize( = {}) requires!(, :login, :password) @options = { :crypt_type => 7 }.update() super end |
Instance Method Details
- (Object) authorize(money, creditcard, options = {})
Referred to as "PreAuth" in the Moneris integration guide, this action verifies and locks funds on a customer's card, which then must be captured at a later date.
Pass in order_id and optionally a customer parameter.
34 35 36 |
# File 'lib/active_merchant/billing/gateways/moneris.rb', line 34 def (money, creditcard, = {}) debit_commit 'preauth', money, creditcard, end |
- (Object) capture(money, authorization, options = {})
This method retrieves locked funds from a customer's account (from a PreAuth) and prepares them for deposit in a merchant's account.
Note: Moneris requires both the order_id and the transaction number of the original authorization. To maintain the same interface as the other gateways the two numbers are concatenated together with a ; separator as the authorization number returned by authorization
53 54 55 |
# File 'lib/active_merchant/billing/gateways/moneris.rb', line 53 def capture(money, , = {}) commit 'completion', crediting_params(, :comp_amount => amount(money)) end |
- (Object) credit(money, authorization, options = {})
Performs a refund. This method requires that the original transaction 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.)
73 74 75 76 |
# File 'lib/active_merchant/billing/gateways/moneris.rb', line 73 def credit(money, , = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, , ) end |
- (Object) purchase(money, creditcard, options = {})
This action verifies funding on a customer's card, and readies them for deposit in a merchant's account.
Pass in order_id and optionally a customer parameter
42 43 44 |
# File 'lib/active_merchant/billing/gateways/moneris.rb', line 42 def purchase(money, creditcard, = {}) debit_commit 'purchase', money, creditcard, end |
- (Object) refund(money, authorization, options = {})
78 79 80 |
# File 'lib/active_merchant/billing/gateways/moneris.rb', line 78 def refund(money, , = {}) commit 'refund', crediting_params(, :amount => amount(money)) end |
- (Boolean) test?
82 83 84 |
# File 'lib/active_merchant/billing/gateways/moneris.rb', line 82 def test? @options[:test] || super end |
- (Object) void(authorization, options = {})
Voiding requires the original transaction ID and order ID of some open transaction. Closed transactions must be refunded. Note that the only methods which may be voided are capture and purchase.
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.)
64 65 66 |
# File 'lib/active_merchant/billing/gateways/moneris.rb', line 64 def void(, = {}) commit 'purchasecorrection', crediting_params() end |