Class: ActiveMerchant::Billing::Integrations::Ccavenue::Helper

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

Instance Method Summary collapse

Instance Method Details

#redirect(mapping = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/active_merchant_ccavenue/helper.rb', line 12

def redirect(mapping = {})
    add_field 'Redirect_Url', mapping[:return_url]
    add_field 'Merchant_Id', ActiveMerchant::Billing::Integrations::Ccavenue.merchant_id
    add_field 'Checksum', get_checksum(
        ActiveMerchant::Billing::Integrations::Ccavenue.merchant_id,
        self.fields[self.mappings[:order]],
        self.fields[self.mappings[:amount]],
        mapping[:return_url],
        ActiveMerchant::Billing::Integrations::Ccavenue.work_key
    )
end