create('jsapi', [ 'appid' => 'wx60a43dd8161666d4', 'mchid' => $config['mch_id'], 'description' => '商品描述', 'out_trade_no' => date("YmdHis"), 'notify_url' => 'https://thinkadmin.top', 'payer' => ['openid' => 'o38gps3vNdCqaggFfrBRCRikwlWY'], 'amount' => ['total' => 1, 'currency' => 'CNY'], ]); echo '
'; echo "\n--- 创建支付参数 ---\n"; var_export($result); } catch (\Exception $exception) { // 出错啦,处理下吧 echo $exception->getMessage() . PHP_EOL; }