|
@@ -368,6 +368,8 @@ class WechatService
|
|
|
{
|
|
{
|
|
|
$order = self::paymentOrder($openid, $out_trade_no, $total_fee, $attach, $body, $detail, $trade_type, $options);
|
|
$order = self::paymentOrder($openid, $out_trade_no, $total_fee, $attach, $body, $detail, $trade_type, $options);
|
|
|
$result = self::paymentService()->prepare($order);
|
|
$result = self::paymentService()->prepare($order);
|
|
|
|
|
+ @file_put_contents('quanju2.txt', json_encode($result)."-微信支付失败3\r\n", 8);
|
|
|
|
|
+
|
|
|
if ($result->return_code == 'SUCCESS' && $result->result_code == 'SUCCESS') {
|
|
if ($result->return_code == 'SUCCESS' && $result->result_code == 'SUCCESS') {
|
|
|
try {
|
|
try {
|
|
|
PaymentRepositories::wechatPaymentPrepare($order, $result->prepay_id);
|
|
PaymentRepositories::wechatPaymentPrepare($order, $result->prepay_id);
|
|
@@ -402,6 +404,7 @@ class WechatService
|
|
|
public static function jsPay($openid, $out_trade_no, $total_fee, $attach, $body, $detail = '', $trade_type = 'JSAPI', $options = [])
|
|
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);
|
|
$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);
|
|
return self::paymentService()->configForJSSDKPayment($paymentPrepare->prepay_id);
|
|
|
}
|
|
}
|
|
|
|
|
|