...
|
...
|
@@ -24,6 +24,9 @@ class PayController extends HomeBaseController |
|
|
'payment' => config('wechat_config.payment'),
|
|
|
];
|
|
|
}
|
|
|
public function test(){
|
|
|
dump(cache('result'));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 微信支付
|
...
|
...
|
@@ -54,7 +57,7 @@ class PayController extends HomeBaseController |
|
|
$app = new Application($this->options);
|
|
|
$payment = $app->payment;
|
|
|
$result = $payment->prepare($order);
|
|
|
|
|
|
cache('result',$result);
|
|
|
if ($result->return_code == 'SUCCESS' && $result->result_code == 'SUCCESS'){
|
|
|
$prepayId = $result->prepay_id;
|
|
|
$jsApiParameters=$payment->configForJSSDKPayment($prepayId);
|
...
|
...
|
|