修复支付成功返回信息格式,去除多余参数

This commit is contained in:
mkm 2024-05-30 15:39:49 +08:00
parent 698c3bb31b
commit c205a804cd

View File

@ -181,7 +181,7 @@ class RetailOrderController extends BaseApiController
Redis::send('send-code-pay', ['number' => $order['number']]);
return $this->success('用户支付中');
}
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::WECHAT_PAY_BARCODE,'transaction_id'=>$result['transaction_id']],1,1);
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::WECHAT_PAY_BARCODE,'transaction_id'=>$result['transaction_id']]);
break;
case PayEnum::ALIPAY_BARCODE:
//支付宝条码支付
@ -190,10 +190,10 @@ class RetailOrderController extends BaseApiController
return $this->fail(PaymentLogic::getError(), $params);
}
if ($result['msg'] !== 'Success') {
return $this->success('用户支付中',[],1,1);
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']],1,1);
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::ALIPAY_BARCODE,'transaction_id'=>$result['trade_no']]);
break;
default:
return $this->fail('支付方式错误');
@ -273,7 +273,7 @@ class RetailOrderController extends BaseApiController
Redis::send('send-code-pay', ['number' => $order['number']]);
return $this->success('用户支付中');
}
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::WECHAT_PAY_BARCODE,'transaction_id'=>$result['transaction_id']],1,1);
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::WECHAT_PAY_BARCODE,'transaction_id'=>$result['transaction_id']]);
break;
case PayEnum::ALIPAY_BARCODE:
//支付宝条码支付
@ -284,7 +284,7 @@ class RetailOrderController extends BaseApiController
if ($result['msg'] !== 'Success') {
return $this->success('用户支付中');
}
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::ALIPAY_BARCODE,'transaction_id'=>$result['trade_no']],1,1);
return $this->success('支付成功', ['out_trade_no'=>$result['out_trade_no'],'pay_type'=>PayEnum::ALIPAY_BARCODE,'transaction_id'=>$result['trade_no']]);
break;
default:
return $this->fail('支付方式错误');