This commit is contained in:
mkm 2024-05-16 11:27:47 +08:00
parent d87470bc95
commit 8ff21f94d2

View File

@ -19,6 +19,7 @@ use app\common\model\user\User;
use app\common\model\user\UserAddress;
use app\common\service\wechat\WeChatConfigService;
use support\Log;
use Webman\RedisQueue\Redis;
class RetailOrderController extends BaseApiController
{
@ -156,8 +157,11 @@ class RetailOrderController extends BaseApiController
if (PaymentLogic::hasError()) {
return $this->fail(PaymentLogic::getError(), $params);
}
if($result['trade_state_desc']=='支付成功'){
if(isset($result['trade_state_desc']) && $result['trade_state_desc']=='支付成功'){
PayNotifyLogic::handle('cashierclass', $result['out_trade_no'], $result);
}else{
Redis::send('send-code-pay', ['number'=>$order['number']]);
return $this->success('用户支付中');
}
return $this->success('', $result);
break;
@ -228,8 +232,11 @@ class RetailOrderController extends BaseApiController
if (PaymentLogic::hasError()) {
return $this->fail(PaymentLogic::getError(), $params);
}
if($result['trade_state_desc']=='支付成功'){
if(isset($result['trade_state_desc']) && $result['trade_state_desc']=='支付成功'){
PayNotifyLogic::handle('cashierclass', $result['out_trade_no'], $result);
}else{
Redis::send('send-code-pay', ['number'=>$order['number']]);
return $this->success('用户支付中');
}
return $this->success('支付成功',['order_id'=>$order['order_id']]);
break;