优化支付逻辑,提供更详细的支付成功信息
This commit is contained in:
parent
8eb7c239a5
commit
7f1b3e8c96
@ -181,8 +181,7 @@ class RetailOrderController extends BaseApiController
|
|||||||
Redis::send('send-code-pay', ['number' => $order['number']]);
|
Redis::send('send-code-pay', ['number' => $order['number']]);
|
||||||
return $this->success('用户支付中');
|
return $this->success('用户支付中');
|
||||||
}
|
}
|
||||||
$result['create_time'] = $order['create_time'];
|
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::WECHAT_PAY_BARCODE,'transaction_id'=>$result['transaction_id']]);
|
||||||
return $this->success('', $result);
|
|
||||||
break;
|
break;
|
||||||
case PayEnum::ALIPAY_BARCODE:
|
case PayEnum::ALIPAY_BARCODE:
|
||||||
//支付宝条码支付
|
//支付宝条码支付
|
||||||
@ -191,10 +190,10 @@ class RetailOrderController extends BaseApiController
|
|||||||
return $this->fail(PaymentLogic::getError(), $params);
|
return $this->fail(PaymentLogic::getError(), $params);
|
||||||
}
|
}
|
||||||
if ($result['msg'] !== 'Success') {
|
if ($result['msg'] !== 'Success') {
|
||||||
return $this->success('用户支付中');
|
return $this->success('用户支付中',[],1,1);
|
||||||
}
|
}
|
||||||
$result['create_time'] = $order['create_time'];
|
$result['create_time'] = $order['create_time'];
|
||||||
return $this->success('', $result);
|
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::ALIPAY_BARCODE,'transaction_id'=>$result['trade_no']]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return $this->fail('支付方式错误');
|
return $this->fail('支付方式错误');
|
||||||
@ -274,8 +273,7 @@ class RetailOrderController extends BaseApiController
|
|||||||
Redis::send('send-code-pay', ['number' => $order['number']]);
|
Redis::send('send-code-pay', ['number' => $order['number']]);
|
||||||
return $this->success('用户支付中');
|
return $this->success('用户支付中');
|
||||||
}
|
}
|
||||||
$result['create_time'] = $order['create_time'];
|
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::WECHAT_PAY_BARCODE,'transaction_id'=>$result['transaction_id']]);
|
||||||
return $this->success('', $result);
|
|
||||||
break;
|
break;
|
||||||
case PayEnum::ALIPAY_BARCODE:
|
case PayEnum::ALIPAY_BARCODE:
|
||||||
//支付宝条码支付
|
//支付宝条码支付
|
||||||
@ -286,8 +284,7 @@ class RetailOrderController extends BaseApiController
|
|||||||
if ($result['msg'] !== 'Success') {
|
if ($result['msg'] !== 'Success') {
|
||||||
return $this->success('用户支付中');
|
return $this->success('用户支付中');
|
||||||
}
|
}
|
||||||
$result['create_time'] = $order['create_time'];
|
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::ALIPAY_BARCODE,'transaction_id'=>$result['trade_no']]);
|
||||||
return $this->success('', $result);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return $this->fail('支付方式错误');
|
return $this->fail('支付方式错误');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user