产品订单自动收货调整,供应商余额结算调整
This commit is contained in:
@@ -177,6 +177,18 @@ class FinanceController extends BaseAdminController
|
||||
$ProductOrder = ProductOrder::find()->where(['id' => $ProductOrderRefund->order_id])->one();
|
||||
if (!$ProductOrder) throw new Exception('产品订单不存在');
|
||||
|
||||
if ($ProductOrder->order_type === 5) {
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$response = $client->post( 'https://api.xiaokang88.com/open-api/client-confirm', [
|
||||
'json' => [
|
||||
'order_id' => $this->orderId,
|
||||
]
|
||||
]);
|
||||
$body = json_decode($response->getBody()->getContents(), true);
|
||||
if ($body['code'] != 0) {
|
||||
exit($body['message']);
|
||||
}
|
||||
}
|
||||
// 更新订单的退款状态为“已退款”
|
||||
$ProductOrder->refund_status = 3;
|
||||
$ProductOrder->saveOrFail();
|
||||
|
||||
Reference in New Issue
Block a user