class OffsitePayments::Integrations::SmilePay::Helper

Public Class Methods

new(order, account, options = {}) click to toggle source
Calls superclass method
# File lib/offsite_payments/integrations/smile_pay.rb, line 34
def initialize(order, account, options = {})
  super

  # 參數碼
  add_field('Rvg2c', 1)
end

Public Instance Methods

shipping_address(params = {}) click to toggle source

把 shipping address 轉成單一欄位

# File lib/offsite_payments/integrations/smile_pay.rb, line 92
def shipping_address(params = {})
  case params
  when Hash
    # TODO handle multi address input fields
    address = params.values.join(',')
  when String
    address = params
  end
  add_field(mappings[:shipping_address], address)
end