Module: OffsitePayments::Integrations::Ecpay

Defined in:
lib/offsite_payments/integrations/ecpay.rb,
lib/offsite_payments/integrations/ecpay/helper.rb,
lib/offsite_payments/integrations/ecpay/notification.rb

Defined Under Namespace

Classes: Helper, Notification

Constant Summary collapse

PAYMENT_CREDIT_CARD =
'Credit'
PAYMENT_ATM =
'ATM'
PAYMENT_CVS =
'CVS'
PAYMENT_ALIPAY =
'Alipay'
PAYMENT_BARCODE =
'BARCODE'
SUBPAYMENT_ATM_TAISHIN =
'TAISHIN'
SUBPAYMENT_ATM_ESUN =
'ESUN'
SUBPAYMENT_ATM_HUANAN =
'HUANAN'
SUBPAYMENT_ATM_BOT =
'BOT'
SUBPAYMENT_ATM_FUBON =
'FUBON'
SUBPAYMENT_ATM_CHINATRUST =
'CHINATRUST'
SUBPAYMENT_ATM_FIRST =
'FIRST'
SUBPAYMENT_CVS_CVS =
'CVS'
SUBPAYMENT_CVS_OK =
'OK'
SUBPAYMENT_CVS_FAMILY =
'FAMILY'
SUBPAYMENT_CVS_HILIFE =
'HILIFE'
SUBPAYMENT_CVS_IBON =
'IBON'
PAYMENT_TYPE =
'aio'

Class Method Summary collapse

Class Method Details

.notification(post) ⇒ Object



47
48
49
# File 'lib/offsite_payments/integrations/ecpay.rb', line 47

def self.notification(post)
  Notification.new(post)
end

.service_urlObject



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/offsite_payments/integrations/ecpay.rb', line 35

def self.service_url
  mode = ActiveMerchant::Billing::Base.mode
  case mode
    when :production
      'https://payment.ecpay.com.tw/Cashier/AioCheckOut/V5'
    when :development, :test
      'https://payment-stage.ecpay.com.tw/Cashier/AioCheckOut/V5'
    else
      raise StandardError, "Integration mode set to an invalid value: #{mode}"
  end
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



51
52
53
# File 'lib/offsite_payments/integrations/ecpay.rb', line 51

def self.setup
  yield(self)
end