浏览代码

[backend] Synchronisation avec Tiller : transmission du bon moyen de paiement

dev
父节点
当前提交
f365de2b4d
共有 1 个文件被更改,包括 18 次插入1 次删除
  1. +18
    -1
      backend/controllers/DistributionController.php

+ 18
- 1
backend/controllers/DistributionController.php 查看文件

@@ -935,6 +935,23 @@ class DistributionController extends BackendController
] ;
}

$typePaymentTiller = '' ;
if($order->mean_payment == MeanPayment::MONEY
|| $order->mean_payment == MeanPayment::CREDIT
|| $order->mean_payment == MeanPayment::TRANSFER
|| $order->mean_payment == MeanPayment::OTHER) {
$typePaymentTiller = 'CASH' ;
}
if($order->mean_payment == MeanPayment::CREDIT_CARD) {
$typePaymentTiller = 'CARD' ;
}
if($order->mean_payment == MeanPayment::CHEQUE) {
$typePaymentTiller = 'BANK_CHECK' ;
}
if(!strlen($typePaymentTiller) || !$order->mean_payment) {
$typePaymentTiller = 'CASH' ;
}
$tiller->postOrder([
'externalId' => $order->id,
'type' => 1,
@@ -943,7 +960,7 @@ class DistributionController extends BackendController
'closeDate' => $strDate,
'lines' => $lines,
'payments' => [[
'type' => 'CASH',
'type' => $typePaymentTiller,
'amount' => $order->getAmount(Order::AMOUNT_TOTAL) * 100,
'status' => 'ACCEPTED',
'date' => $strDate

正在加载...
取消
保存