feat(store_order): 修改订单支付逻辑,增加现金支付处理
This commit is contained in:
parent
40aff5aeb3
commit
dc6f7503f7
@ -345,6 +345,12 @@ class StoreOrderController extends BaseAdminController
|
|||||||
*/
|
*/
|
||||||
public function rechange_amount()
|
public function rechange_amount()
|
||||||
{
|
{
|
||||||
|
// $order = UserRecharge::where('order_id','CZ1719052252643357')->find();
|
||||||
|
// $order['pay_price'] = $order['price'];
|
||||||
|
// d(1);
|
||||||
|
// PayNotifyLogic::handle('recharge', $order['order_id'], $order);
|
||||||
|
|
||||||
|
// d(1);
|
||||||
$pay_type = $this->request->post('pay_type');
|
$pay_type = $this->request->post('pay_type');
|
||||||
$auth_code = $this->request->post('auth_code'); //微信支付条码
|
$auth_code = $this->request->post('auth_code'); //微信支付条码
|
||||||
if ($auth_code == '' && $pay_type != PayEnum::CASH_PAY) {
|
if ($auth_code == '' && $pay_type != PayEnum::CASH_PAY) {
|
||||||
@ -361,10 +367,11 @@ class StoreOrderController extends BaseAdminController
|
|||||||
];
|
];
|
||||||
$order = UserRecharge::create($data);
|
$order = UserRecharge::create($data);
|
||||||
$order['pay_price'] = $order['price'];
|
$order['pay_price'] = $order['price'];
|
||||||
|
$order['buyer_pay_amount'] = $order['price'];
|
||||||
switch ($pay_type) {
|
switch ($pay_type) {
|
||||||
case PayEnum::CASH_PAY:
|
case PayEnum::CASH_PAY:
|
||||||
//现金支付
|
//现金支付
|
||||||
PayNotifyLogic::handle('recharge', $order['order_id'], $order);
|
PayNotifyLogic::handle('recharge', $order['order_id'], $order,'CASH_PAY');
|
||||||
return $this->success('现金支付成功', ['id' => $order['id']]);
|
return $this->success('现金支付成功', ['id' => $order['id']]);
|
||||||
break;
|
break;
|
||||||
case PayEnum::WECHAT_PAY_BARCODE:
|
case PayEnum::WECHAT_PAY_BARCODE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user