|
|
@@ -367,6 +367,7 @@ class WechatService
|
|
|
public static function paymentPrepare($openid, $out_trade_no, $total_fee, $attach, $body, $detail = '', $trade_type = 'JSAPI', $options = [])
|
|
|
{
|
|
|
$order = self::paymentOrder($openid, $out_trade_no, $total_fee, $attach, $body, $detail, $trade_type, $options);
|
|
|
+ @file_put_contents('quanju2.txt', json_encode($order)."-微信支付失败4\r\n", 8);
|
|
|
$result = self::paymentService()->prepare($order);
|
|
|
@file_put_contents('quanju2.txt', json_encode($result)."-微信支付失败3\r\n", 8);
|
|
|
|
|
|
@@ -403,6 +404,7 @@ class WechatService
|
|
|
*/
|
|
|
public static function jsPay($openid, $out_trade_no, $total_fee, $attach, $body, $detail = '', $trade_type = 'JSAPI', $options = [])
|
|
|
{
|
|
|
+
|
|
|
$paymentPrepare = self::paymentPrepare($openid, $out_trade_no, $total_fee, $attach, $body, $detail, $trade_type, $options);
|
|
|
@file_put_contents('quanju2.txt', json_encode($paymentPrepare)."-微信支付失败3r\n", 8);
|
|
|
return self::paymentService()->configForJSSDKPayment($paymentPrepare->prepay_id);
|