Browse Source

Maj V3 Sumup

feature/rotating_product
Guillaume Bourgeois 8 months ago
parent
commit
88021650f8
1 changed files with 11 additions and 6 deletions
  1. +11
    -6
      domain/Order/Order/TillerManager.php

+ 11
- 6
domain/Order/Order/TillerManager.php View File

@@ -142,6 +142,16 @@ class TillerManager extends AbstractManager
if (!$this->isSynchronized($date, $order->id)) {
// v3
if($apiVersion == 'v3') {

$payments = [];
$amountPayment = round($this->orderSolver->getOrderAmountWithTax($order, Order::AMOUNT_PAID) * 100);
if($amountPayment) {
$payments[] = [
'externalId' => ''.$order->id,
'amount' => $amountPayment
];
}

$returnTiller = $this->tillerClient->postOrder([
'externalId' => ''.$order->id,
'purchaseRequestType' => 'clickAndCollect',
@@ -149,12 +159,7 @@ class TillerManager extends AbstractManager
'order' => [
'currencyCode' => 'EUR',
'itemLines' => $lines,
'payments' => [
[
'externalId' => ''.$order->id,
'amount' => round($this->orderSolver->getOrderAmountWithTax($order, Order::AMOUNT_PAID) * 100),
]
]
'payments' => $payments
]
]);
}

Loading…
Cancel
Save