调试支付

This commit is contained in:
liu 2024-06-05 10:19:56 +08:00
parent 88122b8511
commit 73daf982ae
2 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,8 @@ class PayController extends BaseApiController
{
$app = new PayService(1);
$result = $app->wechat->callback(Request()->post());
Log::info(json_decode($result,true));
Log::info($result);
if ($result && $result->event_type == 'TRANSACTION.SUCCESS') {
$ciphertext = $result->resource['ciphertext'];
if ($ciphertext['trade_state'] === 'SUCCESS') {

View File

@ -52,6 +52,7 @@ class PayService extends BasePayService
{
$this->terminal = $terminal;
$config = Config::get('payment');
$config['wechat']['default']['notify_url'] = 'https://test-admin-multi-store.lihaink.cn'.$config['wechat']['default']['notify_url'];
Pay::config($config);
if ($userId !== null) {
$this->auth = UserAuth::where(['user_id' => $userId, 'terminal' => $terminal])->findOrEmpty();