Module: ActiveMerchant::Billing::Integrations::Paydollar

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

Defined Under Namespace

Classes: Helper, Notification, Return

Constant Summary collapse

CURRENCY_MAP =
{
    'AED' => '784',
    'AUD' => '036',
    'BND' => '096',
    'CAD' => '124',
    'CNY' => '156',
    'EUR' => '978',
    'GBP' => '826',
    'HKD' => '344',
    'IDR' => '360',
    'JPY' => '392',
    'KRW' => '410',
    'MOP' => '446',
    'MYR' => '458',
    'NZD' => '554',
    'PHP' => '608',
    'SAR' => '682',
    'SGD' => '702',
    'THB' => '764',
    'TWD' => '901',
    'USD' => '840',
}

Class Method Summary collapse

Class Method Details

.notification(post, options = {}) ⇒ Object



44
45
46
# File 'lib/active_merchant/billing/integrations/paydollar.rb', line 44

def self.notification(post, options = {})
  Notification.new(post, options)
end

.return(query_string, options = {}) ⇒ Object



48
49
50
# File 'lib/active_merchant/billing/integrations/paydollar.rb', line 48

def self.return(query_string, options = {})
  Return.new(query_string, options)
end

.service_urlObject



33
34
35
36
37
38
39
40
41
42
# File 'lib/active_merchant/billing/integrations/paydollar.rb', line 33

def self.service_url
  case ActiveMerchant::Billing::Base.integration_mode
  when :production
    'https://www.paydollar.com/b2c2/eng/payment/payForm.jsp'
  when :test
    'https://test.paydollar.com/b2cDemo/eng/payment/payForm.jsp'
  else
    raise StandardError, "Integration mode set to an invalid value: #{mode}"
  end
end

.sign(fields, secret) ⇒ Object



52
53
54
# File 'lib/active_merchant/billing/integrations/paydollar.rb', line 52

def self.sign(fields, secret)
  Digest::SHA1.hexdigest(fields.push(secret).join('|'))
end