Skip to content

Commit

Permalink
Checking the payment method code before cancelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Pieters committed Mar 8, 2018
1 parent 4ecbd03 commit 81c0332
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions upload/Pay/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,15 @@ public function processTransaction($transactionId) {
$this->updateTransactionStatus($transactionId, $status);

$message = "Pay.nl Updated order to $status.";

//order updaten
$order_info = $this->model_checkout_order->getOrder($transaction['orderId']);

if($order_info['payment_code'] != $this->_paymentMethodName &&
$status == self::STATUS_CANCELED){
return 'Not cancelling because the last used method is not this method';
}

if ($order_info['order_status_id'] != $orderStatusId) {
//alleen updaten als de status daadwerkelijk veranderd, ivm exchange, de order wordt 2 keer aangepast
if ($settings['payment_'.$this->_paymentMethodName . '_send_status_updates'] == 1) {
Expand Down

0 comments on commit 81c0332

Please sign in to comment.