支付宝支付(含二维码)、退款和提现说明
支付宝有三个参数:
1、ali_public(支付宝公钥)
2、public_key(应用公钥)
3、private_key(应用私钥)支付、二维码支付、退款都用2和3,
但是提现要用1和3,否则虽然转账成功,但是会报签名错误,无法进入结果判断状态!!
支付宝有三个参数:
1、ali_public(支付宝公钥)
2、public_key(应用公钥)
3、private_key(应用私钥)支付、二维码支付、退款都用2和3,
但是提现要用1和3,否则虽然转账成功,但是会报签名错误,无法进入结果判断状态!!
用 echo !!!!!!!!!!!!!
不要用 return !!!!!!!!!!!!!!
多个未支付的订单,倒计时30分钟,超过删除
timeTimer();//先走一下
//单纯分钟和秒倒计时
var timer = setInterval(jishiMs,1000);
function jishiMs() {
if($('.daojishi').length <= 0){
clearInterval(timer);
}else{
timeTimer();
}
}
function timeTimer() {
if($('.daojishi').length > 0) { //如果有未支付的订单(将未支付的订单给统一的类daojishi)
$('.daojishi').each(function (data, index) {
var orderTime = $(this).attr('otime');//下单时间(日期)
var nowTime = Date.parse(new Date());//当前时间(时间戳)
//var oid = $(this).attr('orderid');//订单id(PS:用于后续操作)
var time1 = datetime_to_unix(orderTime);//下单时间戳(如果保存的是时间戳直接计算)
var cha = nowTime / 1000 - time1;//差值
if (cha < 1800) {
var M = 29 - Math.floor(cha / 60);
var S = 59 - Math.floor(cha % 60);
if (M < 10) {
M = '0' + M;
}
if (S < 10) {
S = '0' + S;
}
$(this).text(M + ':' + S);
} else {
//倒计时结束,执行操作
}
})
}
}
//将日期转为时间戳
function datetime_to_unix(datetime){
var tmp_datetime = datetime.replace(/:/g,'-');
tmp_datetime = tmp_datetime.replace(/ /g,'-');
var arr = tmp_datetime.split("-");
var now = new Date(Date.UTC(arr[0],arr[1]-1,arr[2],arr[3]-8,arr[4],arr[5]));
return parseInt(now.getTime()/1000);
} 1、日期转时间戳
function datetime_to_unix(datetime){
var tmp_datetime = datetime.replace(/:/g,'-');
tmp_datetime = tmp_datetime.replace(/ /g,'-');
var arr = tmp_datetime.split("-");
var now = new Date(Date.UTC(arr[0],arr[1]-1,arr[2],arr[3]-8,arr[4],arr[5]));
return parseInt(now.getTime()/1000);
}
datetime_to_unix('2018-08-08 22:22:22'); $('.dianhua').bind('input propertychange', function() {
var val = $('.dianhua').val().trim();
$('.dianhua').val(val);
if(val){
var phone = '';
var regPos = /^\d+$/;
for(var i=0;i<val.length;i++){
if(regPos.test(val[i])){
phone = phone+''+val[i];
}else{
$('.dianhua').val(phone);
}
}
}else{
$('.dianhua').val('');
}
});