...
|
...
|
@@ -274,7 +274,7 @@ class Ajax extends Frontend |
|
|
public function refund_notify() {
|
|
|
$app = new Application(ConfigService::load());
|
|
|
$response = $app->payment->handleRefundNotify(function ($message, $reqInfo) {
|
|
|
Log::write(date('Y-m-d H:i') . '订单退款操作,返回数据:' . json_encode($message, JSON_UNESCAPED_UNICODE), 'notice');
|
|
|
// Log::write(date('Y-m-d H:i') . '订单退款操作,返回数据:' . json_encode($message, JSON_UNESCAPED_UNICODE), 'notice');
|
|
|
// 其中 $message['req_info'] 获取到的是加密解密信息
|
|
|
// $reqInfo 成功时为1
|
|
|
// 你的业务逻辑...
|
...
|
...
|
@@ -285,7 +285,7 @@ class Ajax extends Frontend |
|
|
'out_refund_no' => $message['req_info']['out_refund_no']
|
|
|
];
|
|
|
$refund = Db::name('Refund')->where($refund_where)->find();
|
|
|
Log::write(date('Y-m-d H:i') . '订单退款操作1,返回数据:' . json_encode($refund, JSON_UNESCAPED_UNICODE), 'notice');
|
|
|
// Log::write(date('Y-m-d H:i') . '订单退款操作1,返回数据:' . json_encode($refund, JSON_UNESCAPED_UNICODE), 'notice');
|
|
|
if($refund['status'] == 1) {
|
|
|
return true;
|
|
|
} else {
|
...
|
...
|
@@ -325,7 +325,7 @@ class Ajax extends Frontend |
|
|
} elseif($message['req_info']['refund_status'] == 'REFUNDCLOSE') {
|
|
|
$update['status'] = 3;
|
|
|
}
|
|
|
Log::write(date('Y-m-d H:i') . '订单退款操作3,返回数据:' . json_encode($refund_where, JSON_UNESCAPED_UNICODE), 'notice');
|
|
|
// Log::write(date('Y-m-d H:i') . '订单退款操作3,返回数据:' . json_encode($refund_where, JSON_UNESCAPED_UNICODE), 'notice');
|
|
|
$result = Db::name('Refund')->where($refund_where)->update($update);
|
|
|
if(!$result || !$ask_order_result) {
|
|
|
Log::write(date('Y-m-d H:i') . '订单退款操作5,返回数据:' . json_encode([$result,$ask_order_result], JSON_UNESCAPED_UNICODE), 'notice');
|
...
|
...
|
|