Skip to content

Commit

Permalink
Merge pull request #3 from woutse/master
Browse files Browse the repository at this point in the history
Setting total_paid_real field in case of banktransfer
  • Loading branch information
IvoWams authored Aug 27, 2019
2 parents 36f1e39 + 855e34c commit 9f7dcfa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion paynlpaymentmethods/paynlpaymentmethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct()
{
$this->name = 'paynlpaymentmethods';
$this->tab = 'payments_gateways';
$this->version = '4.2.4';
$this->version = '4.2.5';

$this->ps_versions_compliancy = array('min' => '1.7', 'max' => _PS_VERSION_);
$this->author = 'Pay.nl';
Expand Down Expand Up @@ -444,6 +444,12 @@ public function processPayment($transactionId, &$message = null)

$orderPayment->save();

# In case of banktransfer the total_paid_real isn't set, we're doing that now.
if ($order_state == $this->statusPaid && $order->total_paid_real == 0) {
$order->total_paid_real = $orderPayment->amount;
$order->save();
}

$history = new OrderHistory();

$history->id_order = $order->id;
Expand Down

0 comments on commit 9f7dcfa

Please sign in to comment.