正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
@@ -24,6 +24,9 @@ class PayController extends HomeBaseController | @@ -24,6 +24,9 @@ class PayController extends HomeBaseController | ||
24 | 'payment' => config('wechat_config.payment'), | 24 | 'payment' => config('wechat_config.payment'), |
25 | ]; | 25 | ]; |
26 | } | 26 | } |
27 | + public function test(){ | ||
28 | + dump(cache('result')); | ||
29 | + } | ||
27 | 30 | ||
28 | /** | 31 | /** |
29 | * 微信支付 | 32 | * 微信支付 |
@@ -54,7 +57,7 @@ class PayController extends HomeBaseController | @@ -54,7 +57,7 @@ class PayController extends HomeBaseController | ||
54 | $app = new Application($this->options); | 57 | $app = new Application($this->options); |
55 | $payment = $app->payment; | 58 | $payment = $app->payment; |
56 | $result = $payment->prepare($order); | 59 | $result = $payment->prepare($order); |
57 | - | 60 | + cache('result',$result); |
58 | if ($result->return_code == 'SUCCESS' && $result->result_code == 'SUCCESS'){ | 61 | if ($result->return_code == 'SUCCESS' && $result->result_code == 'SUCCESS'){ |
59 | $prepayId = $result->prepay_id; | 62 | $prepayId = $result->prepay_id; |
60 | $jsApiParameters=$payment->configForJSSDKPayment($prepayId); | 63 | $jsApiParameters=$payment->configForJSSDKPayment($prepayId); |
-
请 注册 或 登录 后发表评论