This commit is contained in:
luofei 2024-06-06 09:36:30 +08:00
commit 748d9ea085

View File

@ -28,8 +28,12 @@ class PayController extends BaseApiController
{
$app = new PayService(1);
$result = $app->wechat->callback(Request()->post());
Cache::set('log'.time(),json_encode($result));
Cache::set('logE'.time(),$result->event_type);
Cache::set('logE1'.time(),$result['event_type']??'');
if ($result && $result->event_type == 'TRANSACTION.SUCCESS') {
$ciphertext = $result->resource['ciphertext'];
Cache::set('logc'.time(),$result->resource['ciphertext']);
if ($ciphertext['trade_state'] === 'SUCCESS') {
$attach = $ciphertext['attach'];
switch ($attach) {