Module: ActiveMerchant::Billing::Integrations::Allpay

Defined in:
lib/active_merchant/billing/integrations/allpay.rb,
lib/active_merchant/billing/integrations/allpay/helper.rb,
lib/active_merchant/billing/integrations/allpay/notification.rb

Defined Under Namespace

Classes: Helper, Notification

Constant Summary collapse

PAYMENT_CREDIT_CARD =
'Credit'
PAYMENT_ATM =
'ATM'
PAYMENT_CVS =
'CVS'
PAYMENT_TYPE =
'aio'

Class Method Summary collapse

Class Method Details

.notification(post) ⇒ Object



36
37
38
# File 'lib/active_merchant/billing/integrations/allpay.rb', line 36

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

.service_urlObject



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/active_merchant/billing/integrations/allpay.rb', line 22

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

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

Yields:

  • (_self)

Yield Parameters:



40
41
42
# File 'lib/active_merchant/billing/integrations/allpay.rb', line 40

def self.setup
  yield(self)
end