Module: OffsitePayments::Integrations::Allpay

Defined in:
lib/offsite_payments/integrations/allpay.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



48
49
50
# File 'lib/offsite_payments/integrations/allpay.rb', line 48

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

.service_urlObject



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

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

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

Yields:

  • (_self)

Yield Parameters:



52
53
54
# File 'lib/offsite_payments/integrations/allpay.rb', line 52

def self.setup
  yield(self)
end