Class ActiveMerchant::Billing::PaymentExpressGateway
In: lib/active_merchant/billing/gateways/payment_express.rb
Parent: Gateway

In NZ DPS supports ANZ, Westpac, National Bank, ASB and BNZ. In Australia DPS supports ANZ, NAB, Westpac, CBA, St George and Bank of South Australia. The Maybank in Malaysia is supported and the Citibank for Singapore.

Methods

authorize   capture   credit   new   purchase   store  

Constants

URL = 'https://www.paymentexpress.com/pxpost.aspx'
APPROVED = '1'
TRANSACTIONS = { :purchase => 'Purchase', :credit => 'Refund', :authorization => 'Auth', :capture => 'Complete', :validate => 'Validate'

Public Class methods

We require the DPS gateway username and password when the object is created.

[Source]

    # File lib/active_merchant/billing/gateways/payment_express.rb, line 37
37:       def initialize(options = {})
38:         # A DPS username and password must exist 
39:         requires!(options, :login, :password)
40:         # Make the options an instance variable
41:         @options = options
42:         super
43:       end

Public Instance methods

NOTE: Perhaps in options we allow a transaction note to be inserted Verifies that funds are available for the requested card and amount and reserves the specified amount. See: www.paymentexpress.com/technical_resources/ecommerce_nonhosted/pxpost.html#Authcomplete

[Source]

    # File lib/active_merchant/billing/gateways/payment_express.rb, line 63
63:       def authorize(money, credit_card, options = {})
64:         options[:credit_card] = credit_card
65: 
66:         request = build_purchase_or_authorization_request(money, options)
67:         commit(:authorization, request)
68:       end

Transfer pre-authorized funds immediately See: www.paymentexpress.com/technical_resources/ecommerce_nonhosted/pxpost.html#Authcomplete

[Source]

    # File lib/active_merchant/billing/gateways/payment_express.rb, line 72
72:       def capture(money, identification, options = {})
73:         request = build_capture_or_credit_request(money, identification, options)                                            
74:         commit(:capture, request)
75:       end

Refund funds to the card holder

[Source]

    # File lib/active_merchant/billing/gateways/payment_express.rb, line 78
78:       def credit(money, identification, options = {})
79:         requires!(options, :description)
80:         
81:         request = build_capture_or_credit_request(money, identification, options)                                            
82:         commit(:credit, request)
83:       end

Funds are transferred immediately.

[Source]

    # File lib/active_merchant/billing/gateways/payment_express.rb, line 46
46:       def purchase(money, payment_source, options = {})
47:         
48:         credit_card = payment_source if payment_source.respond_to?(:number)
49:         
50:         if credit_card        
51:           options[:credit_card] = credit_card
52:         else
53:           options[:token]       = payment_source
54:         end
55:         
56:         request = build_purchase_or_authorization_request(money, options)
57:         commit(:purchase, request)      
58:       end

initiates a "Validate" transcation to store card data on payment express servers returns a "token" that can be used to rebill this card see: www.paymentexpress.com/technical_resources/ecommerce_nonhosted/pxpost.html#Tokenbilling PaymentExpress does not support unstoring a stored card.

[Source]

    # File lib/active_merchant/billing/gateways/payment_express.rb, line 91
91:       def store(credit_card, options = {})
92:         request  = build_token_request(credit_card, options)
93:         commit(:validate, request)
94:       end

[Validate]