支付修复Bug
This commit is contained in:
@@ -131,6 +131,7 @@ class ProductOrderSubmitForm extends BaseModel
|
|||||||
$paymentProductOrder->amount = $productOrder['total_pay_price'];
|
$paymentProductOrder->amount = $productOrder['total_pay_price'];
|
||||||
if ($productOrder->prescription->category === 2) {
|
if ($productOrder->prescription->category === 2) {
|
||||||
if ($productOrder->delivery_method === 0) {
|
if ($productOrder->delivery_method === 0) {
|
||||||
|
$paymentProductOrder->amount = $productOrder['trans_expenses'];
|
||||||
$total_fee = $productOrder['trans_expenses'];
|
$total_fee = $productOrder['trans_expenses'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,7 +141,7 @@ class ProductOrderSubmitForm extends BaseModel
|
|||||||
if(bccomp($total_fee,0,2) <= 0){ //无需支付
|
if(bccomp($total_fee,0,2) <= 0){ //无需支付
|
||||||
$t = \Yii::$app->db->beginTransaction();
|
$t = \Yii::$app->db->beginTransaction();
|
||||||
try {
|
try {
|
||||||
$this->paid(['order_no' => $productOrder->order_no]);
|
$this->paid(['order_no' => $productOrder['order_no']]);
|
||||||
$t->commit();
|
$t->commit();
|
||||||
}catch (Exception $exception){
|
}catch (Exception $exception){
|
||||||
$t->rollback();
|
$t->rollback();
|
||||||
|
|||||||
Reference in New Issue
Block a user