diff --git a/app/api/controller/PayController.php b/app/api/controller/PayController.php index dc35889..1adce3d 100644 --- a/app/api/controller/PayController.php +++ b/app/api/controller/PayController.php @@ -39,7 +39,7 @@ class PayController extends BaseApiController Pay::config($config); $result = Pay::wechat()->callback(Request()->post()); if($result && $result->event_type=='TRANSACTION.SUCCESS'){ - $ciphertext=$result->resource->ciphertext; + $ciphertext=$result->resource['ciphertext']; if ($ciphertext['trade_state'] === 'SUCCESS') { $extra['transaction_id'] = $ciphertext['transaction_id']; $attach = $ciphertext['attach'];