Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Extension Development Doubt  (Read 4914 times)

Offline ramya

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Extension Development Doubt
« on: July 31, 2013, 05:10:44 AM »
Hi Admin,

   Please help me out in understanding the code below and develop new extension required for me.
This i found it it 2checkout extension controller page.
what is the use of this? can i modify it and use as checksum validation send by a payment gateway?

// hash check
      if (!md5($this->request->post['sale_id'] . $this->config->get('ccavenue_account') . $this->request->post['invoice_id'] . $this->config->get('ccavenue_secret')) == strtolower($this->request->post['md5_hash'])) {
         exit;
      }

Offline ramya

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Extension Development Doubt
« Reply #1 on: July 31, 2013, 05:11:29 AM »
Please reply me as soon as possible

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Extension Development Doubt
« Reply #2 on: July 31, 2013, 05:40:39 AM »
Hi Admin,

   Please help me out in understanding the code below and develop new extension required for me.
This i found it it 2checkout extension controller page.
what is the use of this? can i modify it and use as checksum validation send by a payment gateway?

// hash check
      if (!md5($this->request->post['sale_id'] . $this->config->get('ccavenue_account') . $this->request->post['invoice_id'] . $this->config->get('ccavenue_secret')) == strtolower($this->request->post['md5_hash'])) {
         exit;
      }

as i understood correctly it's a check of request from 3d party API.. they send md5 hash and extension's controller treid to generate it's own md5 hash which based on it's credentials(invoice_id, sale id etc)...
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod