作者 anyv
1 个管道 的构建 通过 耗费 0 秒

支付

@@ -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);