支付方式修改,修复自提问题
This commit is contained in:
@@ -179,7 +179,7 @@ class ProductOrderSubmitForm extends BaseModel
|
||||
$orderInfo['businessType'] = '100007';
|
||||
$orderInfo['goodsList'] = $goods;
|
||||
|
||||
if ($productOrder->prescription->category?? 1 === 2) {
|
||||
if ($productOrder->prescription->category === 2) {
|
||||
if ($productOrder->delivery_method === 0) {
|
||||
$eplResult = EplPayService::getInstance()->WxJsapiPayment([
|
||||
'order_no' => $pay_order_no,
|
||||
@@ -188,6 +188,20 @@ class ProductOrderSubmitForm extends BaseModel
|
||||
// 'total_pay_price' => $productOrder['total_pay_price'], // 只支付快递费用
|
||||
'total_pay_price' => $productOrder['trans_expenses'],
|
||||
]);
|
||||
} else {
|
||||
// 无需支付
|
||||
$t = \Yii::$app->db->beginTransaction();
|
||||
try {
|
||||
$this->paid(['order_no' => $productOrder->order_no]);
|
||||
$t->commit();
|
||||
}catch (Exception $exception){
|
||||
$t->rollback();
|
||||
throw $exception;
|
||||
}
|
||||
return [
|
||||
'is_paid' => 1,
|
||||
'order_id' => $productOrder['id'],
|
||||
];
|
||||
}
|
||||
} else {
|
||||
$eplResult = EplPayService::getInstance()->WxJsapiPayment([
|
||||
|
||||
Reference in New Issue
Block a user