Class: ActiveMerchant::Billing::Ipay88Gateway

Inherits:
Gateway
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/ipay88.rb

Constant Summary collapse

TEST_URL =
''
LIVE_URL =
'https://www.ipay88.com/recurringpayment/webservice/RecurringPayment.asmx/Subscription'

Constants inherited from Gateway

Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS

Instance Attribute Summary

Attributes inherited from Gateway

#options

Instance Method Summary collapse

Methods inherited from Gateway

#card_brand, card_brand, inherited, supports?, #test?

Methods included from CreditCardFormatting

#format

Constructor Details

#initialize(options = {}) ⇒ Ipay88Gateway

Creates a new Ipay88Gateway

The gateway requires that a valid login and password be passed in the options hash.

Options

  • :login – The ipay88 Merchant Code (REQUIRED)

  • :password – The ipay88 Merchant Code (REQUIRED)



28
29
30
31
32
# File 'lib/active_merchant/billing/gateways/ipay88.rb', line 28

def initialize(options = {})
  requires!(options, :login, :password)
  @options = options
  super
end

Instance Method Details

#recurring(money, creditcard, options = {}) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
# File 'lib/active_merchant/billing/gateways/ipay88.rb', line 34

def recurring(money, creditcard, options = {})
  post = {}
  add_merchant_authentication(post, options)
  add_invoice(post, options)
  add_creditcard(post, creditcard, options)
  add_customer_data(post, options)
  add_address(post, options)
  add_signature(post, options)

  recurring_commit("subscribe", post)
end