class OffsitePayments::Integrations::Paydollar::Helper
Public Class Methods
new(order, account, options = {})
click to toggle source
Calls superclass method
# File lib/offsite_payments/integrations/paydollar.rb, line 81 def initialize(order, account, options = {}) super add_field('payType', 'N') # normal sale and not just auth @secret = options[:credential2] end
Public Instance Methods
currency=(currency_code)
click to toggle source
# File lib/offsite_payments/integrations/paydollar.rb, line 100 def currency=(currency_code) add_field(mappings[:currency], CURRENCY_MAP[currency_code]) end
form_fields()
click to toggle source
# File lib/offsite_payments/integrations/paydollar.rb, line 87 def form_fields @fields.merge('secureHash' => generate_secure_hash) end
generate_secure_hash()
click to toggle source
# File lib/offsite_payments/integrations/paydollar.rb, line 91 def generate_secure_hash fields = [@fields[mappings[:account]], @fields[mappings[:order]], @fields[mappings[:currency]], @fields[mappings[:amount]], @fields['payType']] Paydollar.sign(fields, @secret) end