mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改支付记录
This commit is contained in:
parent
d1e645568f
commit
54e8a74fbc
@ -140,13 +140,14 @@ class JoinPaymentService extends PaymentService
|
||||
}
|
||||
if (isset($notify['r6_Status']) && intval($notify['r6_Status']) === 100) {
|
||||
// 更新支付记录
|
||||
$map = ['order_no' => $notify['r2_OrderNo'], 'payment_type' => static::$type];
|
||||
$this->app->db->name('DataPaymentItem')->where($map)->update([
|
||||
data_save('DataPaymentItem', [
|
||||
'order_no' => $notify['r2_OrderNo'],
|
||||
'payment_type' => static::$type,
|
||||
'payment_code' => $notify['r9_BankTrxNo'],
|
||||
'payment_amount' => $notify['r3_Amount'],
|
||||
'payment_status' => 1,
|
||||
'payment_datatime' => date('Y-m-d H:i:s'),
|
||||
]);
|
||||
], 'order_no', ['payment_type' => static::$type, 'payment_status' => 0]);
|
||||
// 更新记录状态
|
||||
if ($this->updateOrder($notify['r2_OrderNo'], $notify['r9_BankTrxNo'], $notify['r3_Amount'], 'joinpay')) {
|
||||
return 'success';
|
||||
|
@ -104,13 +104,14 @@ class WechatPaymentService extends PaymentService
|
||||
$notify = $this->payment->getNotify();
|
||||
if ($notify['result_code'] == 'SUCCESS' && $notify['return_code'] == 'SUCCESS') {
|
||||
// 更新支付记录
|
||||
$map = ['order_no' => $notify['out_trade_no'], 'payment_type' => static::$type];
|
||||
$this->app->db->name('DataPaymentItem')->where($map)->update([
|
||||
'payment_code' => $notify['r9_BankTrxNo'],
|
||||
'payment_amount' => $notify['r3_Amount'],
|
||||
data_save('DataPaymentItem', [
|
||||
'order_no' => $notify['out_trade_no'],
|
||||
'payment_type' => static::$type,
|
||||
'payment_code' => $notify['transaction_id'],
|
||||
'payment_amount' => $notify['cash_fee'] / 100,
|
||||
'payment_status' => 1,
|
||||
'payment_datatime' => date('Y-m-d H:i:s'),
|
||||
]);
|
||||
], 'order_no', ['payment_type' => static::$type, 'payment_status' => 0]);
|
||||
// 更新记录状态
|
||||
if ($this->updateOrder($notify['out_trade_no'], $notify['transaction_id'], $notify['cash_fee'] / 100, 'wechat')) {
|
||||
return $this->payment->getNotifySuccessReply();
|
||||
|
Loading…
x
Reference in New Issue
Block a user