feat : pay callback
This commit is contained in:
@@ -17,6 +17,7 @@ use App\Constants\Common\PayCode;
|
||||
use App\Exception\ErrException;
|
||||
use App\Model\Order;
|
||||
use App\Model\PayOrder;
|
||||
use App\Model\UserThird;
|
||||
use App\Service\Api\BaseService;
|
||||
use App\Service\Common\Pay\Wx\WxJsRechargeOrderService;
|
||||
use Hyperf\Di\Annotation\Inject;
|
||||
@@ -134,6 +135,12 @@ class PlacePayService extends BaseService
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var UserThird $userThirdModel
|
||||
*/
|
||||
#[Inject]
|
||||
protected UserThird $userThirdModel;
|
||||
|
||||
/**
|
||||
* @return WxJsRechargeOrderService
|
||||
*/
|
||||
@@ -145,7 +152,8 @@ class PlacePayService extends BaseService
|
||||
throw new ErrException('充值异常');
|
||||
}
|
||||
|
||||
$rechargeService->openId = '123';
|
||||
$rechargeService->openId = $this->userThirdModel->getWxThirdInfoByUserId($this->userId);
|
||||
if (empty($rechargeService->openId)) throw new ErrException('该账户不可使用微信支付');
|
||||
|
||||
return $rechargeService;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user