| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343 |
- [2022-04-19 18:09:29] pay.INFO: 支付通道(App\Repositories\Service\Payment\MingsenPayment), 错误信息:(请求异常 (解析) data=<!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta http-equiv="Content-Language" content="zh-cn">
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-touch-fullscreen" content="yes" />
- <meta name="format-detection" content="telephone=no,email=no" />
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
- <meta name="referrer" content="never">
- <meta http-equiv="Expires" content="0">
- <meta http-equiv="Pragma" content="no-cache">
- <meta http-equiv="Cache-control" content="no-cache">
- <meta http-equiv="Cache" content="no-cache">
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <title>支付订单</title>
- <link href="/static/css/main.css?version=1" rel="stylesheet" media="screen">
- <style type="text/css">
- </style>
- </head>
- <body class="clipboard">
- <div class="body">
- <h1 class="mod-title">
- <span id="logoSpan" class="ico_log ico-3"></span>
- </h1>
- <div class="mod-ct">
- <div id="errMsg" style="margin-top:15px;display: none;background-color: #ff0000;color:white;font-size: 18px;font-weight: bold;margin-bottom: 2px;padding: 5px;margin-top: -83px;z-index: 9999;position: relative;"></div>
- <div class="order">
- </div>
- <div class="amount" id="money">¥0.00</div>
- <div class="qrcode-img-wrapper" data-role="qrPayImgWrapper">
- <div id="qrcode" style="display: none;"></div>
- <div data-role="qrPayImg" class="qrcode-img-area">
- <div class="ui-loading qrcode-loading" data-role="qrPayImgLoading"></div>
- <div style="position: relative;">
- <div class="time-item" id="msg" style="color:red;font-size: 18px;font-weight: bold;">
- <span>匹配中,请耐心等待</span><br />
- </div>
- <div id='div_qr_demo_img' style="display: none;"><img id="div_qr_demo_imgnode" style="width: 100%;" src="" data-src="/static/images/weixin_other_scan.jpg"></img></div>
- <div id="divTimer" class="time-item" style="color:red;font-size:22px">
- <strong id="hour_show">0时</strong>
- <strong id="minute_show">0分</strong>
- <strong id="second_show">0秒</strong>
- </div><br />
- <div style="font-size: 14px;font-weight: bold;color: #4c9f9f;">
- <span id='orderId'></span><br />
- 请在规定时间内支付,超时不予赔付
- </div>
- </div>
- </div>
- </div>
- <div id="ali_show" style="display: none;">
- </div>
- <div id="wx_show" style="display: none;">
- </div>
- </div>
- </div>
- <div id="wexin_guide_div" style="display: none;">
- <div class="mod-ct">
- <div style="color: rgb(0 0 0 / 80%);">
- <h1 style="font-size: 20px; padding: 10px;">支付教程</h1>
- <div id="msg2" style="color:red;font-size: 18px;font-weight: bold;">
- </div>
- <div class="pay-text" style="text-align: left; font-size: 20px;">
- <p>
- 1、点击下面黄色按钮复制链接;
- </p>
- <p>
- 2、在微信搜索框输入“文件传输助手”点击进入
- </p>
- <p>
- 3、粘贴复制的链接,然后发送,再点击链接支付
- </p>
- </div>
- <div class="content">
- <div style="margin: 25px 0;"><button id="wxgiudebtn" class="clipboard" data-clipboard-action="copy" style="border-radius: 10px;display: inline-block;width: 80%;margin: 0 20px 0px;height: 40px;color: #405cc1; line-height:36px;background: #eae510;border: 1px solid #babbba;font-size:20px">去支付</button>
- <p style="color:#000000;text-align:center;padding-top:6px;font-size: 16px;">提示:此按钮自动复制链接并唤醒微信</p>
- </div>
- <div id="tutorials-content" style="display:block;">
- <p style="color: #445fc2; font-size: 135%;padding-bottom: 3%; ">图文教程</p>
- <img id="weixinguide_img" src="" data-src="/static/images/wxgzhguide.png" style="width:96%;height:100%">
- </div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="/js/qrcode.min.js"></script>
- <script type='text/javascript' src='/js/jquery.min.js'></script>
- <script type="text/javascript" src="/js/dayjs.min.js"></script>
- <script type="text/javascript" src="/js/clipboard.min.js"></script>
- <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.7/dayjs.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.10/clipboard.min.js"></script> -->
- <script type="text/javascript">
- // var content2 = "<img width='100%' src='/static/images/xxx.gif' />"; //弹出图片
- var urlParams = getUrlParams()
- var level = "0";
- var clipboardUrl = window.location.origin + '/s/' + urlParams['eo'];
- $(function () {
- var amount = urlParams['amount'];
- var orderId = urlParams['eo'];
- $('#money').text('¥' + amount / 100);
- $('#orderId').text('订单:' + orderId);
- // document.title = orderId;
- // $('#clipboardBtn').attr('data-clipboard-text', window.location.href);
- // $('#wxgiudebtn').attr('data-clipboard-text', clipboardUrl);
- if (urlParams['payType'] == 'alipay') {
- $('#logoSpan').removeClass('ico-3');
- $('#logoSpan').addClass('ico-1');
- $('#wxerrer').remove();
- $('#wxerrertwo').remove();
- }
- });
- //读取url参数
- function getUrlParams() {
- var urlParams;
- var match,
- pl = /\+/g, // Regex for replacing addition symbol with a space
- search = /([^&=]+)=?([^&]*)/g,
- decode = function (s) {
- return decodeURIComponent(s.replace(pl, " "));
- },
- query = window.location.search.substring(1);
- urlParams = {};
- while (match = search.exec(query))
- urlParams[decode(match[1])] = decode(match[2]);
- return urlParams
- }
- </script>
- <script type="text/javascript">
- var myTimer;
- var isStopQuery = false;
- var createdAt = parseInt(urlParams['cat']);
- var expireTime;
- var outTime = 120; //匹配订单的过期时间 单位秒
- var intDiff = (parseInt(createdAt) + outTime * 1000 - new Date().getTime()) / 1000;
- var wxPayUrl = '';
- var isChecking = false;
- var matchSeconds = 0;
- var chargeOrderId;
- var phone;
- checkdata();
- function goTimer() {
- myTimer = window.setInterval(function () {
- var day = 0,
- hour = 0,
- minute = 0,
- second = 0; //时间默认值
- if (intDiff > 0) {
- day = Math.floor(intDiff / (60 * 60 * 24));
- hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
- minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
- second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
- }
- if (minute <= 9) minute = '0' + minute;
- if (second <= 9) second = '0' + second;
- $('#hour_show').html('<s id="h"></s>' + hour + '时');
- $('#minute_show').html('<s></s>' + minute + '分');
- $('#second_show').html('<s></s>' + second + '秒');
- if (hour <= 0 && minute <= 0 && second <= 0) {
- isStopQuery = true;
- matchorder_timeout();
- clearInterval(myTimer);
- }
- intDiff = intDiff - 1;
- matchSeconds = matchSeconds + 1;
- if (wxPayUrl == "" && isChecking == false) {
- // if (level != "1") {
- // checkdata();
- // }
- }
- }, 1000);
- }
- //移动表单提交
- function makeCmccFormAndRedirect(payurl) {
- var data = JSON.parse(payurl);
- var formHtml =
- '<div>支付跳转中…</div><form target="_self" id="ebankDepositForm" name="ebankDepositForm" method="POST" action="https://pay.it.10086.cn/payprod-format/h5/dup_submit"><input type="hidden" name="sign" value=\'' + JSON.stringify(data.sign) + '\'/><input type="hidden" name="request_params" value=\'' + JSON.stringify(data.request_params) + '\'/></form>'
- $('body').html(formHtml);
- $('#ebankDepositForm').submit();
- }
- //检测是否有匹配的订单
- function checkdata() {
- isChecking = true;
- var postData = {
- "channelType": "phonecharge", //通道类型
- 'channelCheckSign': 'phonecharge',
- 'payType': urlParams['payType'],
- 'chargeOrderId': chargeOrderId,
- };
- postData.encryptOrder = urlParams['eo'];
- $.ajax({
- type: "POST",
- url: window.location.origin + '/orders/unifiedorder?from=frontend&channelType=phonecharge',
- data: JSON.stringify(postData),
- contentType: "application/json; charset=utf-8",
- dataType: 'json',
- success: function (data, textStatus, jqXHR) {
- isChecking = false;
- var orderInfo = data;
- if (orderInfo) {
- expireTime = orderInfo.payingExpireTime;
- phone=orderInfo.phone;
- if (orderInfo.payType) {
- wxPayUrl = orderInfo.wxPayUrl;
- $('#msg').html("<h1>订单支付过期时间:" + dayjs(orderInfo.payingExpireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + "</h1><h1>匹配订单成功</h1>");
- $('#divTimer').hide();
- window.clearInterval(myTimer);
- $("#wx_show").css("display", "");
- if (wxPayUrl.indexOf('request_params') > -1) {
- //引导
- //直接提交
- makeCmccFormAndRedirect(wxPayUrl);
- } else if (wxPayUrl.indexOf('wxpay/bizpayurl') > -1) {
- weixinQR(wxPayUrl, null, false);
- } else if (wxPayUrl.indexOf('wappay.189.cn/pay/weiXinQueryCode.do') > -1 || wxPayUrl.indexOf('WX002') > -1) {
- if (!isWeixinBrowser()) {
- //对扫
- weixinQR(wxPayUrl);
- //gzh引导
- // clipboardUrl=wxPayUrl;
- // $('#wxgiudebtn').attr('data-clipboard-text', clipboardUrl);
- // weixinGuide(wxPayUrl);
- } else {
- window.location.href = wxPayUrl;
- }
- } else if (wxPayUrl.indexOf('unitradeadapter.alipay.com') > -1) {
- if (isMobile() || window.location.href.indexOf('inaliapp') > -1) {
- window.location.href = 'alipays://platformapi/startapp?appId=20000067&url=' + encodeURIComponent(wxPayUrl);
- } else {
- var directUrl = window.location.href + '&inaliapp=1';
- weixinQR(directUrl, null, false, true);
- }
- } else if (wxPayUrl.indexOf('<form name="myForm" action="https://mapi') > -1) {
- if (window.location.href.indexOf('inaliapp') > -1 || isAlipayBrowser()) {
- $("body").html(wxPayUrl);
- setTimeout(function () {
- $("form[name='myForm']").submit();
- }, 500);
- } else {
- var alipayJumpPayUrl = 'alipays://platformapi/startapp?appId=20000067&url=' + encodeURIComponent(window.location.href + '&inaliapp=1');
- window.location.href = alipayJumpPayUrl;
- $("#wx_show").html('<a class="btn submit_alipay" href="' + alipayJumpPayUrl + '"><font size="5">启动支付宝APP支付</font></a><div style="font-size:18px;color:red;">如果无法自动跳转,请使用截图扫码方式支付</div>');
- weixinQR(window.location.href + '&inaliapp=1', null, false, true);
- }
- }else if(wxPayUrl.indexOf('chong.qq.com') > -1){
- clipboardUrl=phone;
- $('#money').after('<h2>手机号:'+phone+'</h2>');
- //弹出wx话费引导界面
- wxHFGuide(function(){
- weixinQR(wxPayUrl , null, false, false,true);
- })
- } else {
- if (orderInfo.payType == 'wechat') {
- $("#wx_show").html('<a class="btn submit_weixinpay" href="' + data.wxPayUrl + '"><font size="5">启动微信APP支付</font></a>');
- window.location.href = data.wxPayUrl;
- } else {
- $("#wx_show").html('<a class="btn submit_alipay" href="' + data.wxPayUrl + '"><font size="5">启动支付宝APP支付</font></a><div style="font-size:18px;color:red;">如果无法自动跳转,请使用截图扫码方式支付</div>');
- window.location.href = data.wxPayUrl;
- weixinQR(window.location.href + '&inaliapp=1', null, false, true);
- }
- }
- }
- }
- },
- complete: function () {
- if (!wxPayUrl && !isStopQuery) {
- setTimeout(function () {
- checkdata();
- }, 1500)
- }
- },
- error: function (jqXHR) {
- isChecking = false;
- if (jqXHR.responseText) {
- if (jqXHR.responseText.indexOf('assign') > -1) {
- } else if (jqXHR.responseText.indexOf('订单已经存在') > -1) {
- window.clearInterval(myTimer);
- isStopQuery = true;
- $('#msg').html("<h1>订单已经存在,请等待返回,或者重新发起</h1>");
- alert('订单已经存在,请等待返回,或者重新发起')
- } else if (jqXHR.responseText.indexOf('订单失败') > -1 || jqXHR.responseText.indexOf('超时') > -1) {
- alert('错误:' + JSON.parse(jqXHR.responseText).message)
- window.clearInterval(myTimer);
- isStopQuery = true;
- $('#msg').html("<h1>生成订单失败.如需继续支付,请返回商户重新下单</h1>");
- } else if (jqXHR.responseText.indexOf('请关闭代理重新下单支付') > -1) {
- alert('请关闭代理软件后,重新下单')
- window.clearInterval(myTimer);
- isStopQuery = true;
- }
- }
- }
- });
- }
- function matchorder_timeout() {
- var amount = parseInt(urlParams['amount'])
- if (amount == 10000 || amount == 20000) {
- var msg = "亲,您选择的金额因为心情不好离家出走了,不妨找两个50元的小妹暂时排忧解难哦,么么哒!";
- $('#errMsg').html("<span>" + msg + "</span>");
- $('#errMsg').css("display", "");
- setTimeout(function () {
- alert(msg);
- }, 0);
- } else {
- $('#msg').html("<h1>匹配订单失败.如需继续支付,请返回商户重新下单</h1>");
- };
- }
- $().ready(function () {
- //默认6分钟过期
- goTimer();
- });
- function weixinGuide(wxPayUrl) {
- $(".body").hide();
- $("#wexin_guide_div").show();
- $("#weixinguide_img").attr('src', $("#weixinguide_img").attr('data-src'));
- var expireSeconds = 120; //parseInt((expireTime - new Date().getTime()) / 1000) - 40;
- setInterval(function () {
- expireSeconds = expireSeconds - 1;
- if (expireSeconds < 0) {
- $('#msg2').html('支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + '<br/>订单已经过期 请勿支付<br/>');
- } else {
- $('#msg2').html('<span style="font-size:24px;">支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + "<br/>倒计时:" + expireSeconds + '秒</span><br/>');
- }
- }, 1000);
- }
- $("#wxgiudebtn").click(function () {
- alert("链接已复制,去微信粘贴");
- copyClipBoard();
- });
- function copyClipBoard(){
- var clipboard = new ClipboardJS('.clipboard', { text: function () { return clipboardUrl; } });
- clipboard.on('success', function (e) {
- e.clearSelection();
- location.href = 'weixin://';
- })
- clipboard.on('error', function (e) {})
- }
- function weixinQR(wxPayUrl, directUrl, isPay, jietu,cuwx) {
- if (!directUrl) {
- directUrl = "/wxqr.html";
- }
- var href = window.location.origin + directUrl + window.location.search;
- href = wxPayUrl ? wxPayUrl : href;
- var qrcode_elem = document.getElementById('qrcode');
- $('#qrcode').css('display', '');
- var qrcode = new QRCode('qrcode', {
- text: href,
- width: 256,
- height: 256,
- colorDark: "#000000",
- colorLight: "#ffffff",
- correctLevel: QRCode.CorrectLevel.M
- });
- var expireSeconds = parseInt((expireTime - new Date().getTime()) / 1000) - 40;
- var showExpireTime =true; //是否显示过期时间 no2不显示,过期时间90,默认120
- expireSeconds = expireSeconds > 120 ? 120 : expireSeconds;
- setInterval(function () {
- expireSeconds = expireSeconds - 1;
- if (expireSeconds < 0) {
- $('#msg').html('支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + '<br/>订单已经过期 请勿支付<br/>如需支付,请返回商户重新下单');
- $('#qrcode').hide();
- } else {
- if (isPay) {
- $('#msg').html('<span style="font-size:24px;">支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + " 倒计时:" + expireSeconds + '秒</span><br/>“长按”识别图中二维码');
- } else {
- //截图支付
- var expireTimeHTML = showExpireTime ? '<span style="font-size:24px;">支付截止时间:<br/>' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + "</span><br/>" : "";
- var daojishiHTML = "倒计时:" + expireSeconds + '秒<br/>';
- if(cuwx){
- $('#msg').html(expireTimeHTML + daojishiHTML + '<div><button onclick="copyClipBoard()" class="clipboard" data-clipboard-action="copy" style="border-radius: 10px;display: inline-block;width: 100%;margin: 0 0;height: 40px;color: #405cc1; line-height:36px;background: #eae510;border: 1px solid #babbba;font-size:20px">复制号码+打开微信</button></div><div><p>1.截图或长按保存上方充值入口二维码</p> <p>2.点击「复制号码+打开微信」按钮</p> <p>3.打开扫一扫此二维码进入充值页面</p> <p>4.长按手机号码输入框并粘贴充值号码</p> <p>5.选择「与订单金额相同」充值金额支付</p><p style="color:red;"></金额错误、超时支付均无法到账,不退不补!></div>');
- return;
- }
- if (jietu) {
- var showPayType = urlParams['payType'] == 'alipay' ? "支付宝" : "微信";
- $('#msg').html(expireTimeHTML + daojishiHTML + '截取屏幕并进入' + showPayType + '<br/>1.手机用户可保存上方二维码或截图<br/>2.打开右上角扫一扫选择“相册”<br/>3.超时支付不到账,不退款<br/>4.付款链接不可重复使用<br/>付款中遇到警示弹窗,请点击继续支付');
- } else {
- //对扫支付
- $('#msg').html(daojishiHTML);
- if (!$('#div_qr_demo_imgnode').attr('src')) {
- $('#div_qr_demo_imgnode').attr('src', $('#div_qr_demo_imgnode').attr('data-src'));
- }
- $('#div_qr_demo_img').show();
- }
- }
- }
- }, 1000);
- }
- function wxHFGuide(func){
- $('body').append('<div class="zhezhao zhezhao1" style=""><div class="yindao"><span style="font-size: 28px;margin-top: 5%">支付教程</span><img id="step1" src="/static/images/wxhfguide1.jpg" alt="" class="step" style="margin-top: 20px;display: block"><img id="step2" src="/static/images/wxhfguide2.jpg" alt="" class="step" style="margin-top: 20px;display: none"><img id="step3" src="/static/images/wxhfguide3.jpg" alt="" class="step" style="margin-top: 20px;display: none"><img id="step4" src="/static/images/wxhfguide4.jpg" alt="" class="step" style="margin-top: 20px;display: none"><button type="button" class="btn zhezhao1_btn1">下一步</button><button type="button" class="btn zhezhao1_btn2" style="display: none">下一步</button><button type="button" class="btn zhezhao1_btn3" style="display: none">确定</button></div></div>');
- $('.zhezhao1_btn1').click(function () {
- $("#step1").hide()
- $("#step2").show()
- $(".zhezhao1_btn1").hide()
- $(".zhezhao1_btn2").show()
- })
- $('.zhezhao1_btn2').click(function () {
- $("#step2").hide()
- $("#step3").show()
- $(".zhezhao1_btn2").hide()
- $(".zhezhao1_btn3").show()
- })
- $('.zhezhao1_btn3').click(function () {
- $('.zhezhao1').hide();
- func();
- })
- }
- function isWeixinBrowser() {
- var ua = navigator.userAgent.toLowerCase();
- return (/micromessenger/.test(ua)) ? true : false;
- }
- function isAlipayBrowser() {
- var ua = navigator.userAgent.toLowerCase();
- return (/alipayclient/.test(ua)) ? true : false;
- }
- function isMobile() {
- var isMobile = /Mobi|iP(hone|od|ad)|Android|BlackBerry/i.test(navigator.userAgent);
- return isMobile;
- }
- </script>
- </body>
- </html>
- ) {"pay_memberid":"10068","pay_orderid":"CJ202204191809266199","pay_applydate":"2022-04-19 18:09:26","pay_bankcode":"1","pay_notifyurl":"http://dk-server.test.wg8.site/notify/1/432/Mingsen","pay_callbackurl":"http://dk-server.test.wg8.site","pay_amount":"30.00","pay_md5sign":"27718D596694299E729CE35216CCA3A7","pay_productname\t":"CJ"} []
- [2022-04-19 18:10:12] pay.INFO: 支付通道(App\Repositories\Service\Payment\MingsenPayment), 错误信息:(请求异常 (解析) data=<!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta http-equiv="Content-Language" content="zh-cn">
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-touch-fullscreen" content="yes" />
- <meta name="format-detection" content="telephone=no,email=no" />
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
- <meta name="referrer" content="never">
- <meta http-equiv="Expires" content="0">
- <meta http-equiv="Pragma" content="no-cache">
- <meta http-equiv="Cache-control" content="no-cache">
- <meta http-equiv="Cache" content="no-cache">
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <title>支付订单</title>
- <link href="/static/css/main.css?version=1" rel="stylesheet" media="screen">
- <style type="text/css">
- </style>
- </head>
- <body class="clipboard">
- <div class="body">
- <h1 class="mod-title">
- <span id="logoSpan" class="ico_log ico-3"></span>
- </h1>
- <div class="mod-ct">
- <div id="errMsg" style="margin-top:15px;display: none;background-color: #ff0000;color:white;font-size: 18px;font-weight: bold;margin-bottom: 2px;padding: 5px;margin-top: -83px;z-index: 9999;position: relative;"></div>
- <div class="order">
- </div>
- <div class="amount" id="money">¥0.00</div>
- <div class="qrcode-img-wrapper" data-role="qrPayImgWrapper">
- <div id="qrcode" style="display: none;"></div>
- <div data-role="qrPayImg" class="qrcode-img-area">
- <div class="ui-loading qrcode-loading" data-role="qrPayImgLoading"></div>
- <div style="position: relative;">
- <div class="time-item" id="msg" style="color:red;font-size: 18px;font-weight: bold;">
- <span>匹配中,请耐心等待</span><br />
- </div>
- <div id='div_qr_demo_img' style="display: none;"><img id="div_qr_demo_imgnode" style="width: 100%;" src="" data-src="/static/images/weixin_other_scan.jpg"></img></div>
- <div id="divTimer" class="time-item" style="color:red;font-size:22px">
- <strong id="hour_show">0时</strong>
- <strong id="minute_show">0分</strong>
- <strong id="second_show">0秒</strong>
- </div><br />
- <div style="font-size: 14px;font-weight: bold;color: #4c9f9f;">
- <span id='orderId'></span><br />
- 请在规定时间内支付,超时不予赔付
- </div>
- </div>
- </div>
- </div>
- <div id="ali_show" style="display: none;">
- </div>
- <div id="wx_show" style="display: none;">
- </div>
- </div>
- </div>
- <div id="wexin_guide_div" style="display: none;">
- <div class="mod-ct">
- <div style="color: rgb(0 0 0 / 80%);">
- <h1 style="font-size: 20px; padding: 10px;">支付教程</h1>
- <div id="msg2" style="color:red;font-size: 18px;font-weight: bold;">
- </div>
- <div class="pay-text" style="text-align: left; font-size: 20px;">
- <p>
- 1、点击下面黄色按钮复制链接;
- </p>
- <p>
- 2、在微信搜索框输入“文件传输助手”点击进入
- </p>
- <p>
- 3、粘贴复制的链接,然后发送,再点击链接支付
- </p>
- </div>
- <div class="content">
- <div style="margin: 25px 0;"><button id="wxgiudebtn" class="clipboard" data-clipboard-action="copy" style="border-radius: 10px;display: inline-block;width: 80%;margin: 0 20px 0px;height: 40px;color: #405cc1; line-height:36px;background: #eae510;border: 1px solid #babbba;font-size:20px">去支付</button>
- <p style="color:#000000;text-align:center;padding-top:6px;font-size: 16px;">提示:此按钮自动复制链接并唤醒微信</p>
- </div>
- <div id="tutorials-content" style="display:block;">
- <p style="color: #445fc2; font-size: 135%;padding-bottom: 3%; ">图文教程</p>
- <img id="weixinguide_img" src="" data-src="/static/images/wxgzhguide.png" style="width:96%;height:100%">
- </div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="/js/qrcode.min.js"></script>
- <script type='text/javascript' src='/js/jquery.min.js'></script>
- <script type="text/javascript" src="/js/dayjs.min.js"></script>
- <script type="text/javascript" src="/js/clipboard.min.js"></script>
- <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.7/dayjs.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.10/clipboard.min.js"></script> -->
- <script type="text/javascript">
- // var content2 = "<img width='100%' src='/static/images/xxx.gif' />"; //弹出图片
- var urlParams = getUrlParams()
- var level = "0";
- var clipboardUrl = window.location.origin + '/s/' + urlParams['eo'];
- $(function () {
- var amount = urlParams['amount'];
- var orderId = urlParams['eo'];
- $('#money').text('¥' + amount / 100);
- $('#orderId').text('订单:' + orderId);
- // document.title = orderId;
- // $('#clipboardBtn').attr('data-clipboard-text', window.location.href);
- // $('#wxgiudebtn').attr('data-clipboard-text', clipboardUrl);
- if (urlParams['payType'] == 'alipay') {
- $('#logoSpan').removeClass('ico-3');
- $('#logoSpan').addClass('ico-1');
- $('#wxerrer').remove();
- $('#wxerrertwo').remove();
- }
- });
- //读取url参数
- function getUrlParams() {
- var urlParams;
- var match,
- pl = /\+/g, // Regex for replacing addition symbol with a space
- search = /([^&=]+)=?([^&]*)/g,
- decode = function (s) {
- return decodeURIComponent(s.replace(pl, " "));
- },
- query = window.location.search.substring(1);
- urlParams = {};
- while (match = search.exec(query))
- urlParams[decode(match[1])] = decode(match[2]);
- return urlParams
- }
- </script>
- <script type="text/javascript">
- var myTimer;
- var isStopQuery = false;
- var createdAt = parseInt(urlParams['cat']);
- var expireTime;
- var outTime = 120; //匹配订单的过期时间 单位秒
- var intDiff = (parseInt(createdAt) + outTime * 1000 - new Date().getTime()) / 1000;
- var wxPayUrl = '';
- var isChecking = false;
- var matchSeconds = 0;
- var chargeOrderId;
- var phone;
- checkdata();
- function goTimer() {
- myTimer = window.setInterval(function () {
- var day = 0,
- hour = 0,
- minute = 0,
- second = 0; //时间默认值
- if (intDiff > 0) {
- day = Math.floor(intDiff / (60 * 60 * 24));
- hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
- minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
- second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
- }
- if (minute <= 9) minute = '0' + minute;
- if (second <= 9) second = '0' + second;
- $('#hour_show').html('<s id="h"></s>' + hour + '时');
- $('#minute_show').html('<s></s>' + minute + '分');
- $('#second_show').html('<s></s>' + second + '秒');
- if (hour <= 0 && minute <= 0 && second <= 0) {
- isStopQuery = true;
- matchorder_timeout();
- clearInterval(myTimer);
- }
- intDiff = intDiff - 1;
- matchSeconds = matchSeconds + 1;
- if (wxPayUrl == "" && isChecking == false) {
- // if (level != "1") {
- // checkdata();
- // }
- }
- }, 1000);
- }
- //移动表单提交
- function makeCmccFormAndRedirect(payurl) {
- var data = JSON.parse(payurl);
- var formHtml =
- '<div>支付跳转中…</div><form target="_self" id="ebankDepositForm" name="ebankDepositForm" method="POST" action="https://pay.it.10086.cn/payprod-format/h5/dup_submit"><input type="hidden" name="sign" value=\'' + JSON.stringify(data.sign) + '\'/><input type="hidden" name="request_params" value=\'' + JSON.stringify(data.request_params) + '\'/></form>'
- $('body').html(formHtml);
- $('#ebankDepositForm').submit();
- }
- //检测是否有匹配的订单
- function checkdata() {
- isChecking = true;
- var postData = {
- "channelType": "phonecharge", //通道类型
- 'channelCheckSign': 'phonecharge',
- 'payType': urlParams['payType'],
- 'chargeOrderId': chargeOrderId,
- };
- postData.encryptOrder = urlParams['eo'];
- $.ajax({
- type: "POST",
- url: window.location.origin + '/orders/unifiedorder?from=frontend&channelType=phonecharge',
- data: JSON.stringify(postData),
- contentType: "application/json; charset=utf-8",
- dataType: 'json',
- success: function (data, textStatus, jqXHR) {
- isChecking = false;
- var orderInfo = data;
- if (orderInfo) {
- expireTime = orderInfo.payingExpireTime;
- phone=orderInfo.phone;
- if (orderInfo.payType) {
- wxPayUrl = orderInfo.wxPayUrl;
- $('#msg').html("<h1>订单支付过期时间:" + dayjs(orderInfo.payingExpireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + "</h1><h1>匹配订单成功</h1>");
- $('#divTimer').hide();
- window.clearInterval(myTimer);
- $("#wx_show").css("display", "");
- if (wxPayUrl.indexOf('request_params') > -1) {
- //引导
- //直接提交
- makeCmccFormAndRedirect(wxPayUrl);
- } else if (wxPayUrl.indexOf('wxpay/bizpayurl') > -1) {
- weixinQR(wxPayUrl, null, false);
- } else if (wxPayUrl.indexOf('wappay.189.cn/pay/weiXinQueryCode.do') > -1 || wxPayUrl.indexOf('WX002') > -1) {
- if (!isWeixinBrowser()) {
- //对扫
- weixinQR(wxPayUrl);
- //gzh引导
- // clipboardUrl=wxPayUrl;
- // $('#wxgiudebtn').attr('data-clipboard-text', clipboardUrl);
- // weixinGuide(wxPayUrl);
- } else {
- window.location.href = wxPayUrl;
- }
- } else if (wxPayUrl.indexOf('unitradeadapter.alipay.com') > -1) {
- if (isMobile() || window.location.href.indexOf('inaliapp') > -1) {
- window.location.href = 'alipays://platformapi/startapp?appId=20000067&url=' + encodeURIComponent(wxPayUrl);
- } else {
- var directUrl = window.location.href + '&inaliapp=1';
- weixinQR(directUrl, null, false, true);
- }
- } else if (wxPayUrl.indexOf('<form name="myForm" action="https://mapi') > -1) {
- if (window.location.href.indexOf('inaliapp') > -1 || isAlipayBrowser()) {
- $("body").html(wxPayUrl);
- setTimeout(function () {
- $("form[name='myForm']").submit();
- }, 500);
- } else {
- var alipayJumpPayUrl = 'alipays://platformapi/startapp?appId=20000067&url=' + encodeURIComponent(window.location.href + '&inaliapp=1');
- window.location.href = alipayJumpPayUrl;
- $("#wx_show").html('<a class="btn submit_alipay" href="' + alipayJumpPayUrl + '"><font size="5">启动支付宝APP支付</font></a><div style="font-size:18px;color:red;">如果无法自动跳转,请使用截图扫码方式支付</div>');
- weixinQR(window.location.href + '&inaliapp=1', null, false, true);
- }
- }else if(wxPayUrl.indexOf('chong.qq.com') > -1){
- clipboardUrl=phone;
- $('#money').after('<h2>手机号:'+phone+'</h2>');
- //弹出wx话费引导界面
- wxHFGuide(function(){
- weixinQR(wxPayUrl , null, false, false,true);
- })
- } else {
- if (orderInfo.payType == 'wechat') {
- $("#wx_show").html('<a class="btn submit_weixinpay" href="' + data.wxPayUrl + '"><font size="5">启动微信APP支付</font></a>');
- window.location.href = data.wxPayUrl;
- } else {
- $("#wx_show").html('<a class="btn submit_alipay" href="' + data.wxPayUrl + '"><font size="5">启动支付宝APP支付</font></a><div style="font-size:18px;color:red;">如果无法自动跳转,请使用截图扫码方式支付</div>');
- window.location.href = data.wxPayUrl;
- weixinQR(window.location.href + '&inaliapp=1', null, false, true);
- }
- }
- }
- }
- },
- complete: function () {
- if (!wxPayUrl && !isStopQuery) {
- setTimeout(function () {
- checkdata();
- }, 1500)
- }
- },
- error: function (jqXHR) {
- isChecking = false;
- if (jqXHR.responseText) {
- if (jqXHR.responseText.indexOf('assign') > -1) {
- } else if (jqXHR.responseText.indexOf('订单已经存在') > -1) {
- window.clearInterval(myTimer);
- isStopQuery = true;
- $('#msg').html("<h1>订单已经存在,请等待返回,或者重新发起</h1>");
- alert('订单已经存在,请等待返回,或者重新发起')
- } else if (jqXHR.responseText.indexOf('订单失败') > -1 || jqXHR.responseText.indexOf('超时') > -1) {
- alert('错误:' + JSON.parse(jqXHR.responseText).message)
- window.clearInterval(myTimer);
- isStopQuery = true;
- $('#msg').html("<h1>生成订单失败.如需继续支付,请返回商户重新下单</h1>");
- } else if (jqXHR.responseText.indexOf('请关闭代理重新下单支付') > -1) {
- alert('请关闭代理软件后,重新下单')
- window.clearInterval(myTimer);
- isStopQuery = true;
- }
- }
- }
- });
- }
- function matchorder_timeout() {
- var amount = parseInt(urlParams['amount'])
- if (amount == 10000 || amount == 20000) {
- var msg = "亲,您选择的金额因为心情不好离家出走了,不妨找两个50元的小妹暂时排忧解难哦,么么哒!";
- $('#errMsg').html("<span>" + msg + "</span>");
- $('#errMsg').css("display", "");
- setTimeout(function () {
- alert(msg);
- }, 0);
- } else {
- $('#msg').html("<h1>匹配订单失败.如需继续支付,请返回商户重新下单</h1>");
- };
- }
- $().ready(function () {
- //默认6分钟过期
- goTimer();
- });
- function weixinGuide(wxPayUrl) {
- $(".body").hide();
- $("#wexin_guide_div").show();
- $("#weixinguide_img").attr('src', $("#weixinguide_img").attr('data-src'));
- var expireSeconds = 120; //parseInt((expireTime - new Date().getTime()) / 1000) - 40;
- setInterval(function () {
- expireSeconds = expireSeconds - 1;
- if (expireSeconds < 0) {
- $('#msg2').html('支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + '<br/>订单已经过期 请勿支付<br/>');
- } else {
- $('#msg2').html('<span style="font-size:24px;">支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + "<br/>倒计时:" + expireSeconds + '秒</span><br/>');
- }
- }, 1000);
- }
- $("#wxgiudebtn").click(function () {
- alert("链接已复制,去微信粘贴");
- copyClipBoard();
- });
- function copyClipBoard(){
- var clipboard = new ClipboardJS('.clipboard', { text: function () { return clipboardUrl; } });
- clipboard.on('success', function (e) {
- e.clearSelection();
- location.href = 'weixin://';
- })
- clipboard.on('error', function (e) {})
- }
- function weixinQR(wxPayUrl, directUrl, isPay, jietu,cuwx) {
- if (!directUrl) {
- directUrl = "/wxqr.html";
- }
- var href = window.location.origin + directUrl + window.location.search;
- href = wxPayUrl ? wxPayUrl : href;
- var qrcode_elem = document.getElementById('qrcode');
- $('#qrcode').css('display', '');
- var qrcode = new QRCode('qrcode', {
- text: href,
- width: 256,
- height: 256,
- colorDark: "#000000",
- colorLight: "#ffffff",
- correctLevel: QRCode.CorrectLevel.M
- });
- var expireSeconds = parseInt((expireTime - new Date().getTime()) / 1000) - 40;
- var showExpireTime =true; //是否显示过期时间 no2不显示,过期时间90,默认120
- expireSeconds = expireSeconds > 120 ? 120 : expireSeconds;
- setInterval(function () {
- expireSeconds = expireSeconds - 1;
- if (expireSeconds < 0) {
- $('#msg').html('支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + '<br/>订单已经过期 请勿支付<br/>如需支付,请返回商户重新下单');
- $('#qrcode').hide();
- } else {
- if (isPay) {
- $('#msg').html('<span style="font-size:24px;">支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + " 倒计时:" + expireSeconds + '秒</span><br/>“长按”识别图中二维码');
- } else {
- //截图支付
- var expireTimeHTML = showExpireTime ? '<span style="font-size:24px;">支付截止时间:<br/>' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + "</span><br/>" : "";
- var daojishiHTML = "倒计时:" + expireSeconds + '秒<br/>';
- if(cuwx){
- $('#msg').html(expireTimeHTML + daojishiHTML + '<div><button onclick="copyClipBoard()" class="clipboard" data-clipboard-action="copy" style="border-radius: 10px;display: inline-block;width: 100%;margin: 0 0;height: 40px;color: #405cc1; line-height:36px;background: #eae510;border: 1px solid #babbba;font-size:20px">复制号码+打开微信</button></div><div><p>1.截图或长按保存上方充值入口二维码</p> <p>2.点击「复制号码+打开微信」按钮</p> <p>3.打开扫一扫此二维码进入充值页面</p> <p>4.长按手机号码输入框并粘贴充值号码</p> <p>5.选择「与订单金额相同」充值金额支付</p><p style="color:red;"></金额错误、超时支付均无法到账,不退不补!></div>');
- return;
- }
- if (jietu) {
- var showPayType = urlParams['payType'] == 'alipay' ? "支付宝" : "微信";
- $('#msg').html(expireTimeHTML + daojishiHTML + '截取屏幕并进入' + showPayType + '<br/>1.手机用户可保存上方二维码或截图<br/>2.打开右上角扫一扫选择“相册”<br/>3.超时支付不到账,不退款<br/>4.付款链接不可重复使用<br/>付款中遇到警示弹窗,请点击继续支付');
- } else {
- //对扫支付
- $('#msg').html(daojishiHTML);
- if (!$('#div_qr_demo_imgnode').attr('src')) {
- $('#div_qr_demo_imgnode').attr('src', $('#div_qr_demo_imgnode').attr('data-src'));
- }
- $('#div_qr_demo_img').show();
- }
- }
- }
- }, 1000);
- }
- function wxHFGuide(func){
- $('body').append('<div class="zhezhao zhezhao1" style=""><div class="yindao"><span style="font-size: 28px;margin-top: 5%">支付教程</span><img id="step1" src="/static/images/wxhfguide1.jpg" alt="" class="step" style="margin-top: 20px;display: block"><img id="step2" src="/static/images/wxhfguide2.jpg" alt="" class="step" style="margin-top: 20px;display: none"><img id="step3" src="/static/images/wxhfguide3.jpg" alt="" class="step" style="margin-top: 20px;display: none"><img id="step4" src="/static/images/wxhfguide4.jpg" alt="" class="step" style="margin-top: 20px;display: none"><button type="button" class="btn zhezhao1_btn1">下一步</button><button type="button" class="btn zhezhao1_btn2" style="display: none">下一步</button><button type="button" class="btn zhezhao1_btn3" style="display: none">确定</button></div></div>');
- $('.zhezhao1_btn1').click(function () {
- $("#step1").hide()
- $("#step2").show()
- $(".zhezhao1_btn1").hide()
- $(".zhezhao1_btn2").show()
- })
- $('.zhezhao1_btn2').click(function () {
- $("#step2").hide()
- $("#step3").show()
- $(".zhezhao1_btn2").hide()
- $(".zhezhao1_btn3").show()
- })
- $('.zhezhao1_btn3').click(function () {
- $('.zhezhao1').hide();
- func();
- })
- }
- function isWeixinBrowser() {
- var ua = navigator.userAgent.toLowerCase();
- return (/micromessenger/.test(ua)) ? true : false;
- }
- function isAlipayBrowser() {
- var ua = navigator.userAgent.toLowerCase();
- return (/alipayclient/.test(ua)) ? true : false;
- }
- function isMobile() {
- var isMobile = /Mobi|iP(hone|od|ad)|Android|BlackBerry/i.test(navigator.userAgent);
- return isMobile;
- }
- </script>
- </body>
- </html>
- ) {"pay_memberid":"10068","pay_orderid":"CJ202204191810098122","pay_applydate":"2022-04-19 18:10:09","pay_bankcode":"1","pay_notifyurl":"http://dk-server.test.wg8.site/notify/1/433/Mingsen","pay_callbackurl":"http://dk-server.test.wg8.site","pay_amount":"30.00","pay_md5sign":"A8C04DF47AB42BBB5507C235A5A4913B","pay_productname\t":"CJ"} []
- [2022-04-19 18:12:04] pay.INFO: 支付通道(App\Repositories\Service\Payment\MingsenPayment), 错误信息:(请求异常 (解析) data=<!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta http-equiv="Content-Language" content="zh-cn">
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-touch-fullscreen" content="yes" />
- <meta name="format-detection" content="telephone=no,email=no" />
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
- <meta name="referrer" content="never">
- <meta http-equiv="Expires" content="0">
- <meta http-equiv="Pragma" content="no-cache">
- <meta http-equiv="Cache-control" content="no-cache">
- <meta http-equiv="Cache" content="no-cache">
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <title>支付订单</title>
- <link href="/static/css/main.css?version=1" rel="stylesheet" media="screen">
- <style type="text/css">
- </style>
- </head>
- <body class="clipboard">
- <div class="body">
- <h1 class="mod-title">
- <span id="logoSpan" class="ico_log ico-3"></span>
- </h1>
- <div class="mod-ct">
- <div id="errMsg" style="margin-top:15px;display: none;background-color: #ff0000;color:white;font-size: 18px;font-weight: bold;margin-bottom: 2px;padding: 5px;margin-top: -83px;z-index: 9999;position: relative;"></div>
- <div class="order">
- </div>
- <div class="amount" id="money">¥0.00</div>
- <div class="qrcode-img-wrapper" data-role="qrPayImgWrapper">
- <div id="qrcode" style="display: none;"></div>
- <div data-role="qrPayImg" class="qrcode-img-area">
- <div class="ui-loading qrcode-loading" data-role="qrPayImgLoading"></div>
- <div style="position: relative;">
- <div class="time-item" id="msg" style="color:red;font-size: 18px;font-weight: bold;">
- <span>匹配中,请耐心等待</span><br />
- </div>
- <div id='div_qr_demo_img' style="display: none;"><img id="div_qr_demo_imgnode" style="width: 100%;" src="" data-src="/static/images/weixin_other_scan.jpg"></img></div>
- <div id="divTimer" class="time-item" style="color:red;font-size:22px">
- <strong id="hour_show">0时</strong>
- <strong id="minute_show">0分</strong>
- <strong id="second_show">0秒</strong>
- </div><br />
- <div style="font-size: 14px;font-weight: bold;color: #4c9f9f;">
- <span id='orderId'></span><br />
- 请在规定时间内支付,超时不予赔付
- </div>
- </div>
- </div>
- </div>
- <div id="ali_show" style="display: none;">
- </div>
- <div id="wx_show" style="display: none;">
- </div>
- </div>
- </div>
- <div id="wexin_guide_div" style="display: none;">
- <div class="mod-ct">
- <div style="color: rgb(0 0 0 / 80%);">
- <h1 style="font-size: 20px; padding: 10px;">支付教程</h1>
- <div id="msg2" style="color:red;font-size: 18px;font-weight: bold;">
- </div>
- <div class="pay-text" style="text-align: left; font-size: 20px;">
- <p>
- 1、点击下面黄色按钮复制链接;
- </p>
- <p>
- 2、在微信搜索框输入“文件传输助手”点击进入
- </p>
- <p>
- 3、粘贴复制的链接,然后发送,再点击链接支付
- </p>
- </div>
- <div class="content">
- <div style="margin: 25px 0;"><button id="wxgiudebtn" class="clipboard" data-clipboard-action="copy" style="border-radius: 10px;display: inline-block;width: 80%;margin: 0 20px 0px;height: 40px;color: #405cc1; line-height:36px;background: #eae510;border: 1px solid #babbba;font-size:20px">去支付</button>
- <p style="color:#000000;text-align:center;padding-top:6px;font-size: 16px;">提示:此按钮自动复制链接并唤醒微信</p>
- </div>
- <div id="tutorials-content" style="display:block;">
- <p style="color: #445fc2; font-size: 135%;padding-bottom: 3%; ">图文教程</p>
- <img id="weixinguide_img" src="" data-src="/static/images/wxgzhguide.png" style="width:96%;height:100%">
- </div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="/js/qrcode.min.js"></script>
- <script type='text/javascript' src='/js/jquery.min.js'></script>
- <script type="text/javascript" src="/js/dayjs.min.js"></script>
- <script type="text/javascript" src="/js/clipboard.min.js"></script>
- <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.7/dayjs.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.10/clipboard.min.js"></script> -->
- <script type="text/javascript">
- // var content2 = "<img width='100%' src='/static/images/xxx.gif' />"; //弹出图片
- var urlParams = getUrlParams()
- var level = "0";
- var clipboardUrl = window.location.origin + '/s/' + urlParams['eo'];
- $(function () {
- var amount = urlParams['amount'];
- var orderId = urlParams['eo'];
- $('#money').text('¥' + amount / 100);
- $('#orderId').text('订单:' + orderId);
- // document.title = orderId;
- // $('#clipboardBtn').attr('data-clipboard-text', window.location.href);
- // $('#wxgiudebtn').attr('data-clipboard-text', clipboardUrl);
- if (urlParams['payType'] == 'alipay') {
- $('#logoSpan').removeClass('ico-3');
- $('#logoSpan').addClass('ico-1');
- $('#wxerrer').remove();
- $('#wxerrertwo').remove();
- }
- });
- //读取url参数
- function getUrlParams() {
- var urlParams;
- var match,
- pl = /\+/g, // Regex for replacing addition symbol with a space
- search = /([^&=]+)=?([^&]*)/g,
- decode = function (s) {
- return decodeURIComponent(s.replace(pl, " "));
- },
- query = window.location.search.substring(1);
- urlParams = {};
- while (match = search.exec(query))
- urlParams[decode(match[1])] = decode(match[2]);
- return urlParams
- }
- </script>
- <script type="text/javascript">
- var myTimer;
- var isStopQuery = false;
- var createdAt = parseInt(urlParams['cat']);
- var expireTime;
- var outTime = 120; //匹配订单的过期时间 单位秒
- var intDiff = (parseInt(createdAt) + outTime * 1000 - new Date().getTime()) / 1000;
- var wxPayUrl = '';
- var isChecking = false;
- var matchSeconds = 0;
- var chargeOrderId;
- var phone;
- checkdata();
- function goTimer() {
- myTimer = window.setInterval(function () {
- var day = 0,
- hour = 0,
- minute = 0,
- second = 0; //时间默认值
- if (intDiff > 0) {
- day = Math.floor(intDiff / (60 * 60 * 24));
- hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
- minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
- second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
- }
- if (minute <= 9) minute = '0' + minute;
- if (second <= 9) second = '0' + second;
- $('#hour_show').html('<s id="h"></s>' + hour + '时');
- $('#minute_show').html('<s></s>' + minute + '分');
- $('#second_show').html('<s></s>' + second + '秒');
- if (hour <= 0 && minute <= 0 && second <= 0) {
- isStopQuery = true;
- matchorder_timeout();
- clearInterval(myTimer);
- }
- intDiff = intDiff - 1;
- matchSeconds = matchSeconds + 1;
- if (wxPayUrl == "" && isChecking == false) {
- // if (level != "1") {
- // checkdata();
- // }
- }
- }, 1000);
- }
- //移动表单提交
- function makeCmccFormAndRedirect(payurl) {
- var data = JSON.parse(payurl);
- var formHtml =
- '<div>支付跳转中…</div><form target="_self" id="ebankDepositForm" name="ebankDepositForm" method="POST" action="https://pay.it.10086.cn/payprod-format/h5/dup_submit"><input type="hidden" name="sign" value=\'' + JSON.stringify(data.sign) + '\'/><input type="hidden" name="request_params" value=\'' + JSON.stringify(data.request_params) + '\'/></form>'
- $('body').html(formHtml);
- $('#ebankDepositForm').submit();
- }
- //检测是否有匹配的订单
- function checkdata() {
- isChecking = true;
- var postData = {
- "channelType": "phonecharge", //通道类型
- 'channelCheckSign': 'phonecharge',
- 'payType': urlParams['payType'],
- 'chargeOrderId': chargeOrderId,
- };
- postData.encryptOrder = urlParams['eo'];
- $.ajax({
- type: "POST",
- url: window.location.origin + '/orders/unifiedorder?from=frontend&channelType=phonecharge',
- data: JSON.stringify(postData),
- contentType: "application/json; charset=utf-8",
- dataType: 'json',
- success: function (data, textStatus, jqXHR) {
- isChecking = false;
- var orderInfo = data;
- if (orderInfo) {
- expireTime = orderInfo.payingExpireTime;
- phone=orderInfo.phone;
- if (orderInfo.payType) {
- wxPayUrl = orderInfo.wxPayUrl;
- $('#msg').html("<h1>订单支付过期时间:" + dayjs(orderInfo.payingExpireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + "</h1><h1>匹配订单成功</h1>");
- $('#divTimer').hide();
- window.clearInterval(myTimer);
- $("#wx_show").css("display", "");
- if (wxPayUrl.indexOf('request_params') > -1) {
- //引导
- //直接提交
- makeCmccFormAndRedirect(wxPayUrl);
- } else if (wxPayUrl.indexOf('wxpay/bizpayurl') > -1) {
- weixinQR(wxPayUrl, null, false);
- } else if (wxPayUrl.indexOf('wappay.189.cn/pay/weiXinQueryCode.do') > -1 || wxPayUrl.indexOf('WX002') > -1) {
- if (!isWeixinBrowser()) {
- //对扫
- weixinQR(wxPayUrl);
- //gzh引导
- // clipboardUrl=wxPayUrl;
- // $('#wxgiudebtn').attr('data-clipboard-text', clipboardUrl);
- // weixinGuide(wxPayUrl);
- } else {
- window.location.href = wxPayUrl;
- }
- } else if (wxPayUrl.indexOf('unitradeadapter.alipay.com') > -1) {
- if (isMobile() || window.location.href.indexOf('inaliapp') > -1) {
- window.location.href = 'alipays://platformapi/startapp?appId=20000067&url=' + encodeURIComponent(wxPayUrl);
- } else {
- var directUrl = window.location.href + '&inaliapp=1';
- weixinQR(directUrl, null, false, true);
- }
- } else if (wxPayUrl.indexOf('<form name="myForm" action="https://mapi') > -1) {
- if (window.location.href.indexOf('inaliapp') > -1 || isAlipayBrowser()) {
- $("body").html(wxPayUrl);
- setTimeout(function () {
- $("form[name='myForm']").submit();
- }, 500);
- } else {
- var alipayJumpPayUrl = 'alipays://platformapi/startapp?appId=20000067&url=' + encodeURIComponent(window.location.href + '&inaliapp=1');
- window.location.href = alipayJumpPayUrl;
- $("#wx_show").html('<a class="btn submit_alipay" href="' + alipayJumpPayUrl + '"><font size="5">启动支付宝APP支付</font></a><div style="font-size:18px;color:red;">如果无法自动跳转,请使用截图扫码方式支付</div>');
- weixinQR(window.location.href + '&inaliapp=1', null, false, true);
- }
- }else if(wxPayUrl.indexOf('chong.qq.com') > -1){
- clipboardUrl=phone;
- $('#money').after('<h2>手机号:'+phone+'</h2>');
- //弹出wx话费引导界面
- wxHFGuide(function(){
- weixinQR(wxPayUrl , null, false, false,true);
- })
- } else {
- if (orderInfo.payType == 'wechat') {
- $("#wx_show").html('<a class="btn submit_weixinpay" href="' + data.wxPayUrl + '"><font size="5">启动微信APP支付</font></a>');
- window.location.href = data.wxPayUrl;
- } else {
- $("#wx_show").html('<a class="btn submit_alipay" href="' + data.wxPayUrl + '"><font size="5">启动支付宝APP支付</font></a><div style="font-size:18px;color:red;">如果无法自动跳转,请使用截图扫码方式支付</div>');
- window.location.href = data.wxPayUrl;
- weixinQR(window.location.href + '&inaliapp=1', null, false, true);
- }
- }
- }
- }
- },
- complete: function () {
- if (!wxPayUrl && !isStopQuery) {
- setTimeout(function () {
- checkdata();
- }, 1500)
- }
- },
- error: function (jqXHR) {
- isChecking = false;
- if (jqXHR.responseText) {
- if (jqXHR.responseText.indexOf('assign') > -1) {
- } else if (jqXHR.responseText.indexOf('订单已经存在') > -1) {
- window.clearInterval(myTimer);
- isStopQuery = true;
- $('#msg').html("<h1>订单已经存在,请等待返回,或者重新发起</h1>");
- alert('订单已经存在,请等待返回,或者重新发起')
- } else if (jqXHR.responseText.indexOf('订单失败') > -1 || jqXHR.responseText.indexOf('超时') > -1) {
- alert('错误:' + JSON.parse(jqXHR.responseText).message)
- window.clearInterval(myTimer);
- isStopQuery = true;
- $('#msg').html("<h1>生成订单失败.如需继续支付,请返回商户重新下单</h1>");
- } else if (jqXHR.responseText.indexOf('请关闭代理重新下单支付') > -1) {
- alert('请关闭代理软件后,重新下单')
- window.clearInterval(myTimer);
- isStopQuery = true;
- }
- }
- }
- });
- }
- function matchorder_timeout() {
- var amount = parseInt(urlParams['amount'])
- if (amount == 10000 || amount == 20000) {
- var msg = "亲,您选择的金额因为心情不好离家出走了,不妨找两个50元的小妹暂时排忧解难哦,么么哒!";
- $('#errMsg').html("<span>" + msg + "</span>");
- $('#errMsg').css("display", "");
- setTimeout(function () {
- alert(msg);
- }, 0);
- } else {
- $('#msg').html("<h1>匹配订单失败.如需继续支付,请返回商户重新下单</h1>");
- };
- }
- $().ready(function () {
- //默认6分钟过期
- goTimer();
- });
- function weixinGuide(wxPayUrl) {
- $(".body").hide();
- $("#wexin_guide_div").show();
- $("#weixinguide_img").attr('src', $("#weixinguide_img").attr('data-src'));
- var expireSeconds = 120; //parseInt((expireTime - new Date().getTime()) / 1000) - 40;
- setInterval(function () {
- expireSeconds = expireSeconds - 1;
- if (expireSeconds < 0) {
- $('#msg2').html('支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + '<br/>订单已经过期 请勿支付<br/>');
- } else {
- $('#msg2').html('<span style="font-size:24px;">支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + "<br/>倒计时:" + expireSeconds + '秒</span><br/>');
- }
- }, 1000);
- }
- $("#wxgiudebtn").click(function () {
- alert("链接已复制,去微信粘贴");
- copyClipBoard();
- });
- function copyClipBoard(){
- var clipboard = new ClipboardJS('.clipboard', { text: function () { return clipboardUrl; } });
- clipboard.on('success', function (e) {
- e.clearSelection();
- location.href = 'weixin://';
- })
- clipboard.on('error', function (e) {})
- }
- function weixinQR(wxPayUrl, directUrl, isPay, jietu,cuwx) {
- if (!directUrl) {
- directUrl = "/wxqr.html";
- }
- var href = window.location.origin + directUrl + window.location.search;
- href = wxPayUrl ? wxPayUrl : href;
- var qrcode_elem = document.getElementById('qrcode');
- $('#qrcode').css('display', '');
- var qrcode = new QRCode('qrcode', {
- text: href,
- width: 256,
- height: 256,
- colorDark: "#000000",
- colorLight: "#ffffff",
- correctLevel: QRCode.CorrectLevel.M
- });
- var expireSeconds = parseInt((expireTime - new Date().getTime()) / 1000) - 40;
- var showExpireTime =true; //是否显示过期时间 no2不显示,过期时间90,默认120
- expireSeconds = expireSeconds > 120 ? 120 : expireSeconds;
- setInterval(function () {
- expireSeconds = expireSeconds - 1;
- if (expireSeconds < 0) {
- $('#msg').html('支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + '<br/>订单已经过期 请勿支付<br/>如需支付,请返回商户重新下单');
- $('#qrcode').hide();
- } else {
- if (isPay) {
- $('#msg').html('<span style="font-size:24px;">支付截止时间:' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + " 倒计时:" + expireSeconds + '秒</span><br/>“长按”识别图中二维码');
- } else {
- //截图支付
- var expireTimeHTML = showExpireTime ? '<span style="font-size:24px;">支付截止时间:<br/>' + dayjs(expireTime).subtract(40, 's').format('YYYY-MM-DD HH:mm:ss') + "</span><br/>" : "";
- var daojishiHTML = "倒计时:" + expireSeconds + '秒<br/>';
- if(cuwx){
- $('#msg').html(expireTimeHTML + daojishiHTML + '<div><button onclick="copyClipBoard()" class="clipboard" data-clipboard-action="copy" style="border-radius: 10px;display: inline-block;width: 100%;margin: 0 0;height: 40px;color: #405cc1; line-height:36px;background: #eae510;border: 1px solid #babbba;font-size:20px">复制号码+打开微信</button></div><div><p>1.截图或长按保存上方充值入口二维码</p> <p>2.点击「复制号码+打开微信」按钮</p> <p>3.打开扫一扫此二维码进入充值页面</p> <p>4.长按手机号码输入框并粘贴充值号码</p> <p>5.选择「与订单金额相同」充值金额支付</p><p style="color:red;"></金额错误、超时支付均无法到账,不退不补!></div>');
- return;
- }
- if (jietu) {
- var showPayType = urlParams['payType'] == 'alipay' ? "支付宝" : "微信";
- $('#msg').html(expireTimeHTML + daojishiHTML + '截取屏幕并进入' + showPayType + '<br/>1.手机用户可保存上方二维码或截图<br/>2.打开右上角扫一扫选择“相册”<br/>3.超时支付不到账,不退款<br/>4.付款链接不可重复使用<br/>付款中遇到警示弹窗,请点击继续支付');
- } else {
- //对扫支付
- $('#msg').html(daojishiHTML);
- if (!$('#div_qr_demo_imgnode').attr('src')) {
- $('#div_qr_demo_imgnode').attr('src', $('#div_qr_demo_imgnode').attr('data-src'));
- }
- $('#div_qr_demo_img').show();
- }
- }
- }
- }, 1000);
- }
- function wxHFGuide(func){
- $('body').append('<div class="zhezhao zhezhao1" style=""><div class="yindao"><span style="font-size: 28px;margin-top: 5%">支付教程</span><img id="step1" src="/static/images/wxhfguide1.jpg" alt="" class="step" style="margin-top: 20px;display: block"><img id="step2" src="/static/images/wxhfguide2.jpg" alt="" class="step" style="margin-top: 20px;display: none"><img id="step3" src="/static/images/wxhfguide3.jpg" alt="" class="step" style="margin-top: 20px;display: none"><img id="step4" src="/static/images/wxhfguide4.jpg" alt="" class="step" style="margin-top: 20px;display: none"><button type="button" class="btn zhezhao1_btn1">下一步</button><button type="button" class="btn zhezhao1_btn2" style="display: none">下一步</button><button type="button" class="btn zhezhao1_btn3" style="display: none">确定</button></div></div>');
- $('.zhezhao1_btn1').click(function () {
- $("#step1").hide()
- $("#step2").show()
- $(".zhezhao1_btn1").hide()
- $(".zhezhao1_btn2").show()
- })
- $('.zhezhao1_btn2').click(function () {
- $("#step2").hide()
- $("#step3").show()
- $(".zhezhao1_btn2").hide()
- $(".zhezhao1_btn3").show()
- })
- $('.zhezhao1_btn3').click(function () {
- $('.zhezhao1').hide();
- func();
- })
- }
- function isWeixinBrowser() {
- var ua = navigator.userAgent.toLowerCase();
- return (/micromessenger/.test(ua)) ? true : false;
- }
- function isAlipayBrowser() {
- var ua = navigator.userAgent.toLowerCase();
- return (/alipayclient/.test(ua)) ? true : false;
- }
- function isMobile() {
- var isMobile = /Mobi|iP(hone|od|ad)|Android|BlackBerry/i.test(navigator.userAgent);
- return isMobile;
- }
- </script>
- </body>
- </html>
- ) {"pay_memberid":"10068","pay_orderid":"CJ202204191812014991","pay_applydate":"2022-04-19 18:12:01","pay_bankcode":"1","pay_notifyurl":"http://dk-server.test.wg8.site/notify/1/434/Mingsen","pay_callbackurl":"http://dk-server.test.wg8.site","pay_amount":"30.00","pay_md5sign":"194701F571DC4B5A66F5CED1C69FDD39","pay_productname\t":"CJ","pay_post":"json"} []
- [2022-04-19 18:34:58] pay.INFO: 支付通道(App\Repositories\Service\Payment\MingsenPayment), 错误信息:(请求异常 (解析) data=http://203.107.60.156:1337/phonecharge.html?amount=3000&eo=MzU5MTA4Mzc8PjI1&cat=1650364498443&payType=wechat) {"pay_memberid":"10068","pay_orderid":"CJ202204191834575786","pay_applydate":"2022-04-19 18:34:57","pay_bankcode":"1","pay_notifyurl":"http://dk-server.test.wg8.site/notify/1/435/Mingsen","pay_callbackurl":"http://dk-server.test.wg8.site","pay_amount":"30.00","pay_md5sign":"40FD61099977AD299FE8113E19CE4F89","pay_productname\t":"CJ","pay_post":"json"} []
- [2022-04-19 18:36:59] pay.INFO: 支付通道(App\Repositories\Service\Payment\MingsenPayment), 错误信息:(请求异常,请求失败 data={"status":"error","msg":"不存在的商户编号!","data":[]}) {"pay_memberid":"10068","pay_orderid":"CJ202204191836585458","pay_applydate":"2022-04-19 18:36:58","pay_bankcode":"1","pay_notifyurl":"http://dk-server.test.wg8.site/notify/1/437/Mingsen","pay_callbackurl":"http://dk-server.test.wg8.site","pay_amount":"30.00","pay_md5sign":"DEA34A49720080489F9A10CEFB61295B","pay_productname\t":"CJ","pay_post":"json"} []
|