1. 程式人生 > >ectouch 微信支付成功後訂單狀態未改變的解決辦法

ectouch 微信支付成功後訂單狀態未改變的解決辦法

微信支付支付成功後,返回到mobile/wx_native_callback.php


之前程式碼


define('IN_ECS', true);
require(dirname(__FILE__) . '/include/init.php');
require(ROOT_PATH . 'include/lib_payment.php');
require_once(ROOT_PATH .'include/modules/payment/wx_new_jspay.php');
$payment = new wx_new_qrcode();
$payment->respond();
exit;


修改後:


<?php
define('IN_ECTOUCH', true);
define('IN_ECS', true);


require(dirname(__FILE__) . '/include/init.php');
 
require(ROOT_PATH . 'include/lib_payment.php');
require_once(ROOT_PATH .'include/modules/payment/wx_new_jspay.php');
$payment = new wx_new_jspay();
$payment->respond();
exit;


還有mobile/include/modules/payment/wx_new_jspay.php


修復


     // $root_url = str_replace('mobile/', '', $GLOBALS['ecs']->url());


$root_url=$GLOBALS['ecs']->url();


讓他返回到mobile/wx_native_callback.php