调试支付回调
This commit is contained in:
parent
73daf982ae
commit
f12b537d71
@ -6,6 +6,7 @@ use app\common\enum\PayEnum;
|
||||
use app\common\logic\PayNotifyLogic;
|
||||
use app\common\model\retail\Cashierclass;
|
||||
use app\common\service\pay\PayService;
|
||||
use support\Cache;
|
||||
use support\Log;
|
||||
use hg\apidoc\annotation as ApiDoc;
|
||||
#[ApiDoc\NotParse()]
|
||||
@ -27,8 +28,8 @@ class PayController extends BaseApiController
|
||||
{
|
||||
$app = new PayService(1);
|
||||
$result = $app->wechat->callback(Request()->post());
|
||||
Log::info(json_decode($result,true));
|
||||
Log::info($result);
|
||||
Cache::set('log'.time(),$result);
|
||||
Cache::set('logJ'.time(),json_encode($result));
|
||||
if ($result && $result->event_type == 'TRANSACTION.SUCCESS') {
|
||||
$ciphertext = $result->resource['ciphertext'];
|
||||
if ($ciphertext['trade_state'] === 'SUCCESS') {
|
||||
|
@ -52,7 +52,6 @@ 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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user