Class ActiveMerchant::Billing::MonerisGateway
In: lib/active_merchant/billing/gateways/moneris.rb
Parent: Gateway

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.

Methods

authorize   capture   credit   new   purchase   void  

Constants

TEST_URL = 'https://esqa.moneris.com/gateway2/servlet/MpgRequest'
LIVE_URL = 'https://www3.moneris.com/gateway2/servlet/MpgRequest'

Public Class methods

login is your Store ID password is your API Token

[Source]

    # File lib/active_merchant/billing/gateways/moneris.rb, line 23
23:       def initialize(options = {})
24:         requires!(options, :login, :password)
25:         @options = { :crypt_type => 7 }.update(options)
26:         super      
27:       end

Public Instance methods

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.

[Source]

    # File lib/active_merchant/billing/gateways/moneris.rb, line 34
34:       def authorize(money, creditcard, options = {})
35:         debit_commit 'preauth', money, creditcard, options        
36:       end

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

[Source]

    # File lib/active_merchant/billing/gateways/moneris.rb, line 53
53:       def capture(money, authorization, options = {})
54:         commit 'completion', crediting_params(authorization, :comp_amount => amount(money))
55:       end

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.)

[Source]

    # File lib/active_merchant/billing/gateways/moneris.rb, line 73
73:       def credit(money, authorization, options = {})
74:         commit 'refund', crediting_params(authorization, :amount => amount(money))
75:       end

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

[Source]

    # File lib/active_merchant/billing/gateways/moneris.rb, line 42
42:       def purchase(money, creditcard, options = {})
43:         debit_commit 'purchase', money, creditcard, options
44:       end

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.)

[Source]

    # File lib/active_merchant/billing/gateways/moneris.rb, line 64
64:       def void(authorization, options = {})
65:         commit 'purchasecorrection', crediting_params(authorization)
66:       end

[Validate]