update
This commit is contained in:
@@ -66,9 +66,21 @@ class Wechat
|
||||
* @Date : 2022/9/9 11:32
|
||||
* @Author : <Jason.C>
|
||||
*/
|
||||
public function payment()
|
||||
public function payment(): string
|
||||
{
|
||||
return View::fetch();
|
||||
$config = Config::get('wechat.payment');
|
||||
$payment = Factory::payment($config);
|
||||
$unify = $payment->order->unify([
|
||||
'body' => '商品订单',
|
||||
'out_trade_no' => time(),
|
||||
'total_fee' => 100,
|
||||
'notify_url' => '',
|
||||
'trade_type' => 'JSAPI',
|
||||
'openid' => '$openid',
|
||||
]);
|
||||
$prepayId = $unify->prepay_id;
|
||||
$jssdk = $payment->jssdk->bridgeConfig($prepayId);
|
||||
return View::fetch('', ['jssdk' => $jssdk]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user