Skip to content

Commit

Permalink
Fix un-required mail being blast out
Browse files Browse the repository at this point in the history
Change the setting for the plugin not to blast out any email after the
order have successfully created.
  • Loading branch information
eddy03 committed Jan 9, 2014
1 parent 53c9226 commit 8c88e40
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions catalog/controller/payment/molpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ public function callback() {
$merchantid = $this->config->get('molpay_merchantid');
$verifykey = $this->config->get('molpay_verifykey');

$tranID = $_POST['tranID'];
$orderid = $_POST['orderid'];
$status = $_POST['status'];
$domain = $_POST['domain'];
$amount = $_POST['amount'];
$currency = $_POST['currency'];
$appcode = $_POST['appcode'];
$paydate = $_POST['paydate'];
$skey = $_POST['skey'];
$tranID = $_POST['tranID'];
$orderid = $_POST['orderid'];
$status = $_POST['status'];
$domain = $_POST['domain'];
$amount = $_POST['amount'];
$currency = $_POST['currency'];
$appcode = $_POST['appcode'];
$paydate = $_POST['paydate'];
$skey = $_POST['skey'];

$key0 = md5($tranID.$orderid.$status.$domain.$amount.$currency);
$key1 = md5($paydate.$merchantid.$key0.$appcode.$verifykey);
Expand All @@ -76,10 +76,10 @@ public function callback() {
$this->model_checkout_order->confirm($this->request->post['orderid'], $this->config->get('molpay_order_status_id'));

if ( $status == "00" ) {
$this->model_checkout_order->update($orderid , $this->config->get('molpay_success_status_id'), 'MP Normal Return', true);
$this->model_checkout_order->update($orderid , $this->config->get('molpay_success_status_id'), 'MP Normal Return', false);
$this->redirect(HTTP_SERVER . 'index.php?route=checkout/success');
} else {
$this->model_checkout_order->update($orderid , $this->config->get('molpay_failed_status_id'), 'MP Normal Return', true);
$this->model_checkout_order->update($orderid , $this->config->get('molpay_failed_status_id'), 'MP Normal Return', false);

$this->data['continue'] = $this->url->link('checkout/cart');

Expand All @@ -99,16 +99,16 @@ public function callback_nb() {
$merchantid = $this->config->get('molpay_merchantid');
$verifykey = $this->config->get('molpay_verifykey');

$nbcb = $_POST['nbcb'];
$tranID = $_POST['tranID'];
$orderid = $_POST['orderid'];
$status = $_POST['status'];
$domain = $_POST['domain'];
$amount = $_POST['amount'];
$currency = $_POST['currency'];
$appcode = $_POST['appcode'];
$paydate = $_POST['paydate'];
$skey = $_POST['skey'];
$nbcb = $_POST['nbcb'];
$tranID = $_POST['tranID'];
$orderid = $_POST['orderid'];
$status = $_POST['status'];
$domain = $_POST['domain'];
$amount = $_POST['amount'];
$currency = $_POST['currency'];
$appcode = $_POST['appcode'];
$paydate = $_POST['paydate'];
$skey = $_POST['skey'];

$key0 = md5($tranID.$orderid.$status.$domain.$amount.$currency);
$key1 = md5($paydate.$merchantid.$key0.$appcode.$verifykey);
Expand All @@ -124,10 +124,10 @@ public function callback_nb() {
$this->model_checkout_order->confirm($this->request->post['orderid'], $this->config->get('molpay_order_status_id'));

if ( $status == "00" ) {
$this->model_checkout_order->update($orderid , $this->config->get('molpay_success_status_id'), 'MP Callback Return', true);
$this->model_checkout_order->update($orderid , $this->config->get('molpay_success_status_id'), 'MP Callback Return', false);
}
else {
$this->model_checkout_order->update($orderid, $this->config->get('molpay_failed_status_id'), 'MP Callback Return', true);
$this->model_checkout_order->update($orderid, $this->config->get('molpay_failed_status_id'), 'MP Callback Return', false);
}
}
}
Expand Down

0 comments on commit 8c88e40

Please sign in to comment.