Commit 2ca0ad75 by agan

修改

parent edafad25
...@@ -70,32 +70,30 @@ ...@@ -70,32 +70,30 @@
$(".gash-for-ul").html(html); $(".gash-for-ul").html(html);
$(".gash-for-ul li").on("click", function () { $(".gash-for-ul li").on("click", function () {
if (flag) {
flag = false;
var money = $(this).children("button").children('i').text();
var rid = $(this).children(".gash-rid").text();
$.ajax({ $.ajax({
type: "POST", url: _url + "/pay/getPaymentWall.html",
url: $ip + "/pay/getCodaPay.html",
data: { data: {
'lang': sessionStorage.lang, uid: localStorage.uid,
'uid': sessionStorage.uid, country: '86',
'product': "橙钻充值", rid: sessionStorage.rid,
'country': "86", amount: sessionStorage.money,
'rid': rid, returnUrl: _url4 + '/phonepay/paySuccess.html?lang=' + sessionStorage.lang,
'payType': sessionStorage.pay, failureUrl: _url4 + '/phonepay/payFail.html?lang=' + sessionStorage.lang,
'paymentType': sessionStorage.payType, firstName: sessionStorage.firstName || '',
'payTypeSub': "NAVITE", lastName: sessionStorage.lastName || '',
'amount': money * 100, email: sessionStorage.email || '',
phone: sessionStorage.phone || '',
product: langList[langType].text53,
payType: sessionStorage.pay,
}, },
async: true,
success: function (res) { success: function (res) {
console.log(res); if (res.code == 1) {
var data = JSON.parse(res); window.location.href = res.url;
window.location.href = 'https://airtime.codapayments.com/airtime/begin?type=' + sessionStorage.payType + '&txn_id=' + data.result + '&browser_type=mobile-web'; } else {
layer.msg(res.msg);
} }
});
} }
})
}) })
} }
......
...@@ -70,32 +70,30 @@ ...@@ -70,32 +70,30 @@
$(".gash-for-ul").html(html); $(".gash-for-ul").html(html);
$(".gash-for-ul li").on("click", function () { $(".gash-for-ul li").on("click", function () {
if (flag) {
flag = false;
var money = $(this).children("button").children('i').text();
var rid = $(this).children(".gash-rid").text();
$.ajax({ $.ajax({
type: "POST", url: _url + "/pay/getPaymentWall.html",
url: $ip + "/pay/getCodaPay.html",
data: { data: {
'lang': sessionStorage.lang, uid: localStorage.uid,
'uid': sessionStorage.uid, country: '86',
'product': "橙钻充值", rid: sessionStorage.rid,
'country': "86", amount: sessionStorage.money,
'rid': rid, returnUrl: _url4 + '/phonepay/paySuccess.html?lang=' + sessionStorage.lang,
'payType': sessionStorage.pay, failureUrl: _url4 + '/phonepay/payFail.html?lang=' + sessionStorage.lang,
'paymentType': sessionStorage.payType, firstName: sessionStorage.firstName || '',
'payTypeSub': "NAVITE", lastName: sessionStorage.lastName || '',
'amount': money * 100, email: sessionStorage.email || '',
phone: sessionStorage.phone || '',
product: langList[langType].text53,
payType: sessionStorage.pay,
}, },
async: true,
success: function (res) { success: function (res) {
console.log(res); if (res.code == 1) {
var data = JSON.parse(res); window.location.href = res.url;
window.location.href = 'https://airtime.codapayments.com/airtime/begin?type=' + sessionStorage.payType + '&txn_id=' + data.result + '&browser_type=mobile-web'; } else {
layer.msg(res.msg);
} }
});
} }
})
}) })
} }
......
...@@ -70,32 +70,30 @@ ...@@ -70,32 +70,30 @@
$(".gash-for-ul").html(html); $(".gash-for-ul").html(html);
$(".gash-for-ul li").on("click", function () { $(".gash-for-ul li").on("click", function () {
if (flag) {
flag = false;
var money = $(this).children("button").children('i').text();
var rid = $(this).children(".gash-rid").text();
$.ajax({ $.ajax({
type: "POST", url: _url + "/pay/getPaymentWall.html",
url: $ip + "/pay/getCodaPay.html",
data: { data: {
'lang': sessionStorage.lang, uid: localStorage.uid,
'uid': sessionStorage.uid, country: '86',
'product': "橙钻充值", rid: sessionStorage.rid,
'country': "86", amount: sessionStorage.money,
'rid': rid, returnUrl: _url4 + '/phonepay/paySuccess.html?lang=' + sessionStorage.lang,
'payType': sessionStorage.pay, failureUrl: _url4 + '/phonepay/payFail.html?lang=' + sessionStorage.lang,
'paymentType': sessionStorage.payType, firstName: sessionStorage.firstName || '',
'payTypeSub': "NAVITE", lastName: sessionStorage.lastName || '',
'amount': money * 100, email: sessionStorage.email || '',
phone: sessionStorage.phone || '',
product: langList[langType].text53,
payType: sessionStorage.pay,
}, },
async: true,
success: function (res) { success: function (res) {
console.log(res); if (res.code == 1) {
var data = JSON.parse(res); window.location.href = res.url;
window.location.href = 'https://airtime.codapayments.com/airtime/begin?type=' + sessionStorage.payType + '&txn_id=' + data.result + '&browser_type=mobile-web'; } else {
layer.msg(res.msg);
} }
});
} }
})
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment