News:

AbanteCart v1.4.2 is released.

Main Menu

Do you like AbanteCart? Please rate AbanteCart or share your experience with other eCommerce entrepreneurs. Go to Softaculous rating page to add your rating or write a review

Extension Development Doubt

Started by ramya, July 31, 2013, 05:10:44 AM

Previous topic - Next topic

ramya

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;
      }

ramya

Please reply me as soon as possible

abolabo

Quote from: ramya 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;
      }

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

Forum Rules Code of conduct
AbanteCart.com 2010 -