Class: ActiveMerchant::Billing::Integrations::Ebs::Helper

Inherits:
Helper
  • Object
show all
Defined in:
lib/active_merchant_ebs/helper.rb

Instance Method Summary collapse

Instance Method Details

#redirect(mapping = {}) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/active_merchant_ebs/helper.rb', line 26

def redirect(mapping = {})
    add_field 'return_url', mapping[:return_url]
    add_field 'reference_no', mapping[:order_id]
    add_field 'description', mapping[:order_desc]
    add_field 'account_id', ActiveMerchant::Billing::Integrations::Ebs.
    add_field 'mode', ActiveMerchant::Billing::Integrations::Ebs.mode
    add_field 'Checksum', get_checksum(
                                ActiveMerchant::Billing::Integrations::Ebs.,
                                self.fields[self.mappings[:order_id]],
                                self.fields[self.mappings[:amount]],
                                mapping[:return_url],
                                ActiveMerchant::Billing::Integrations::Ebs.secret_key
                            )
end