修改alipay源码(以修改php文件为例,app端)
修改xxxxcom/ThinkPHP/Extend/Vendor/SdkAlipay/alipay_notify.class.php 文件
123456789function verifyNotify()注释(//$isSign = $this->getSignVeryfy($_POST, $_POST["sign"]);)添加 $isSign = true;注释( //if (! empty($_POST["notify_id"])) {$responseTxt = $this->getResponse($_POST["notify_id"]);})function verifyReturn()注释(//$isSign = $this->getSignVeryfy($_REQUEST, $_REQUEST["sign"]);)添加 $isSign = true;注释( //if (! empty($_POST["notify_id"])) {$responseTxt = $this->getResponse($_POST["notify_id"]);})修改xxxxcom/Gate/handler/AliPayApp/PayHandler.class.php
12345function verifyReturn()//判断验证是否通过和合法注释 $is_from_alipay = file_get_contents("https://mapi.alipay.com/gateway.do?service=notify_verify&partner=" . $config['partner'] . "¬ify_id=" . $_POST['notify_id']);添加 $is_from_alipay = 'true';
|
|
- 配置host
192.168.149.34 mapi.alipay.com修改银联支付源码(以修改php文件为例,pc端)
修改xxxxcom/ThinkPHP/Extend/Vendor/UnionPayApp/sdk/BackReceive.php
1234567891011/*if($result['code'] != self::RESULT_OK) {return self::returnM(self::RESULT_ERROR, null, $cTrace, $result['trace'], $result['errMsg']);}if(self::isRespCodeSuccess($response['respCode']) == false) {return self::returnM(self::RESULT_ERROR, null, $cTrace, null, '回调支付状态为不成功');}*/注释加密校验修改xxxxcom/Conf/debug.php
将所有回调url的IP/端口改成“http://192.168.143.171:8139”- 配置host
192.168.149.34 gateway.95516.com
修改银联支付源码(app端涉及文件)
/Conf/escrow.php:
- https://gateway.95516.com/gateway/api/appTransReq.do (URL请求订单)
- vim ThinkPHP/Extend/Vendor/UnionPayApp/sdk/UnionPayAppBase.php (银联支付基于rpc请求)
- vim ThinkPHP/Extend/Vendor/UnionPayApp/sdk/AppConsume.php (下发订单到银联支付)
修改微信支付源码(以修改php文件为例,pc端)
修改xxxxcom/Gate/handler/WeixinPay/PayHandler.class.php
12注释加密校验, line 194if($notify->checkSign() == false) {服务端配置host
192.168.149.34 api.mch.weixin.qq.com- 或者修改xxxxcom/ThinkPHP/Extend/Vendor/WxPay/UnifiedOrderPub.php12$this->url = 'https://api.mch.weixin.qq.com/pay/unifiedorder';to $this->url = 'https://192.168.149.34/pay/unifiedorder';
- 或者修改xxxxcom/ThinkPHP/Extend/Vendor/WxPay/UnifiedOrderPub.php
修改页面xxxxcom/Apps/User/View/Pay/pc_wxpay.html
12345修改生成QRjs:function createQrCode(code_url) {$(".code").html('<br><br><br><br><br><br><a href='+ code_url +' target="_blank" style="background: none repeat scroll 0 0 #ff464e;color: #fff;font-family: "微软雅黑","宋体";font-size: 20px;text-align: center;width: 180px;height: 50px;line-height: 50px;border-radius: 3px;">Weixin Pay</a>');}
修改一网通支付源码(以修改php文件为例,app端)
- 修改xxxxcom/Gate/handler/CmbOneNet/PayHandler.class.php1234verifyReturn注释加密校验//$isVerify = $obj->verifyPaNotify($notifyStr);$isVerify = true;
or:
修改xxxxcom/ThinkPHP/Extend/Vendor/CmbOneNet/CmbOneNet.php123verifyPaNotify //return $isSuccess === true; return true;
xxxxcom/Conf/config.php add ‘GATEWAY_USER_AGENT’=> ‘wushi’,
rm -rf /xxxxcom/Runtime/*配置host
192.168.149.34 netpay.cmbchina.com