支付方式修改
This commit is contained in:
@@ -178,12 +178,25 @@ class ProductOrderSubmitForm extends BaseModel
|
||||
$orderInfo['Id'] = $productOrder['order_no'];
|
||||
$orderInfo['businessType'] = '100007';
|
||||
$orderInfo['goodsList'] = $goods;
|
||||
$eplResult = EplPayService::getInstance()->WxJsapiPayment([
|
||||
'order_no' => $pay_order_no,
|
||||
'openId' => \Yii::$app->user->identity->openid,
|
||||
'orderInfo' => $orderInfo,
|
||||
'total_pay_price' => $productOrder['total_pay_price'],
|
||||
]);
|
||||
|
||||
if ($productOrder->prescription->category?? 1 === 2) {
|
||||
if ($productOrder->delivery_method === 0) {
|
||||
$eplResult = EplPayService::getInstance()->WxJsapiPayment([
|
||||
'order_no' => $pay_order_no,
|
||||
'openId' => \Yii::$app->user->identity->openid,
|
||||
'orderInfo' => $orderInfo,
|
||||
'total_pay_price' => $productOrder['trans_expenses'],
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
$eplResult = EplPayService::getInstance()->WxJsapiPayment([
|
||||
'order_no' => $pay_order_no,
|
||||
'openId' => \Yii::$app->user->identity->openid,
|
||||
'orderInfo' => $orderInfo,
|
||||
'total_pay_price' => $productOrder['total_pay_price'],
|
||||
]);
|
||||
}
|
||||
|
||||
if(!isset($eplResult['returnCode']) || $eplResult['returnCode'] != '0000'){
|
||||
throw new Exception($eplResult['returnMsg']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user