Merge branch 'dev-cz' of 47.111.118.107:/srv/git/platform into dev-cz

master
chenzhi 5 years ago
commit 0669d15e3e

@ -64,7 +64,7 @@ class NotifyController extends BaseController
//获取回调订单信息 //获取回调订单信息
$order_info = $pay->getInfo(); $order_info = $pay->getInfo();
Log::write(serialize($order_info), Log::DEBUG); Log::write(serialize($order_info), Log::DEBUG);
if ($order_info['status']) { if ($order_info['status']) {
$pay_where = substr($order_info['out_trade_no'], 0, 2); $pay_where = substr($order_info['out_trade_no'], 0, 2);
@ -92,21 +92,21 @@ Log::write(serialize($order_info), Log::DEBUG);
case 'TB': case 'TB':
$result = $this->set_balance($order_info); $result = $this->set_balance($order_info);
$to_balance = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php/Home/PromoteCoin/lists'; $to_balance = 'http://' . $_SERVER['HTTP_HOST'] . '/index.php/Home/PromoteCoin/lists';
break; break;
case 'BR': case 'BR':
$result = $this->set_bind_recharge($order_info); $result = $this->set_bind_recharge($order_info);
break; break;
case 'SI': case 'SI':
$result = $this->set_order($order_info); $result = $this->set_order($order_info);
break; break;
case 'SS': // 超级签 case 'SS': // 超级签
$this->supersign_pay_notify(array( $this->supersign_pay_notify(array(
'trade_id' => $order_info['trade_no'], 'trade_id' => $order_info['trade_no'],
'order_id' => $order_info['out_trade_no'] 'order_id' => $order_info['out_trade_no']
)); ));
break; break;
default: default:
exit('accident order data'); exit('accident order data');
@ -120,11 +120,11 @@ Log::write(serialize($order_info), Log::DEBUG);
if (I('get.method') == "return") { if (I('get.method') == "return") {
switch (I('get.model')) { switch (I('get.model')) {
case 'Home': case 'Home':
if($to_balance) { if($to_balance) {
redirect($to_balance); redirect($to_balance);
} else { } else {
redirect('http://' . $_SERVER['HTTP_HOST'] . '/index.php/Home/Charge/agent_pay_list'); redirect('http://' . $_SERVER['HTTP_HOST'] . '/index.php/Home/Charge/agent_pay_list');
} }
break; break;
case 'Media': case 'Media':
redirect('http://' . $_SERVER['HTTP_HOST'] . '/media.php/Member/users_index'); redirect('http://' . $_SERVER['HTTP_HOST'] . '/media.php/Member/users_index');
@ -136,7 +136,7 @@ Log::write(serialize($order_info), Log::DEBUG);
redirect('http://' . $_SERVER['HTTP_HOST'] . '/media.php/Member/users_index'); redirect('http://' . $_SERVER['HTTP_HOST'] . '/media.php/Member/users_index');
break; break;
} }
} else { } else {
$pay->notifySuccess(); $pay->notifySuccess();
} }
@ -162,8 +162,8 @@ Log::write(serialize($order_info), Log::DEBUG);
/** /**
*微信回调 *微信回调
*/ */
public function swiftpass_callback(){ public function swiftpass_callback(){
$xml = file_get_contents('php://input'); $xml = file_get_contents('php://input');
$Swiftpass=new Swiftpass(C('weixin_gf.partner'),C('weixin_gf.key')); $Swiftpass=new Swiftpass(C('weixin_gf.partner'),C('weixin_gf.key'));
@ -183,13 +183,13 @@ Log::write(serialize($order_info), Log::DEBUG);
$result = $this->set_deposit($order_info); $result = $this->set_deposit($order_info);
break; break;
case 'AG': case 'AG':
$result = $this->set_agent($order_info); $result = $this->set_agent($order_info);
break; break;
case 'TB': case 'TB':
$result = $this->set_balance($order_info); $result = $this->set_balance($order_info);
break; break;
case 'SI': case 'SI':
$result = $this->set_order($order_info); $result = $this->set_order($order_info);
break; break;
default: default:
exit('accident order data'); exit('accident order data');
@ -197,7 +197,7 @@ Log::write(serialize($order_info), Log::DEBUG);
} }
echo 'success'; echo 'success';
exit(); exit();
}else{ }else{
echo 'failure'; echo 'failure';
exit(); exit();
@ -208,7 +208,32 @@ Log::write(serialize($order_info), Log::DEBUG);
} }
/**
*超级签微信充值回调
*/
public function supersign_wxpay_notify(){
$xml = file_get_contents('php://input');
$Swiftpass=new Swiftpass(C('wei_xin.partner'), C('wei_xin.key'));
$Swiftpass->resHandler->setContent($xml);
$Swiftpass->resHandler->setKey( C('wei_xin.key'));
if($Swiftpass->resHandler->isTenpaySign()){
if($Swiftpass->resHandler->getParameter('status') == 0 && $Swiftpass->resHandler->getParameter('result_code') == 0){
$trade_no=$Swiftpass->resHandler->getParameter('transaction_id');
$out_trade_no = $Swiftpass->resHandler->getParameter('out_trade_no');
$this->supersign_pay_notify(array(
'trade_id' => $trade_no,
'order_id' => $out_trade_no
));
echo 'success';
}else{
echo 'failure';
}
}else{
echo 'failure';
}
}
/** /**
* 支付宝退款回调 * 支付宝退款回调
@ -232,7 +257,7 @@ Log::write(serialize($order_info), Log::DEBUG);
$date['tui_time'] = time(); $date['tui_time'] = time();
M('refund_record', 'tab_')->where($map)->save($date); M('refund_record', 'tab_')->where($map)->save($date);
file_put_contents(dirname(__FILE__)."/as.txt", json_encode(M('refund_record','tab_')->getlastsql())); file_put_contents(dirname(__FILE__)."/as.txt", json_encode(M('refund_record','tab_')->getlastsql()));
$map_spend['pay_order_number'] = get_refund_pay_order_number($batch_no); $map_spend['pay_order_number'] = get_refund_pay_order_number($batch_no);
$spen_date['sub_status']=1; $spen_date['sub_status']=1;
$spen_date['settle_check']= 1; $spen_date['settle_check']= 1;
@ -381,92 +406,92 @@ Log::write(serialize($order_info), Log::DEBUG);
exit; exit;
} }
@$p7_paychannelnum=$_POST['p7_paychannelnum']; @$p7_paychannelnum=$_POST['p7_paychannelnum'];
if(empty($p7_paychannelnum)) if(empty($p7_paychannelnum))
{ {
$p7_paychannelnum=""; $p7_paychannelnum="";
} }
$signmsg=C('jft.key');//支付秘钥 $signmsg=C('jft.key');//支付秘钥
@$md5info_paramet = $_REQUEST['p1_usercode']."&".$_REQUEST['p2_order']."&".$_REQUEST['p3_money']."&".$_REQUEST['p4_status']."&".$_REQUEST['p5_jtpayorder']."&".$_REQUEST['p6_paymethod']."&".$_REQUEST['p7_paychannelnum']."&".$_REQUEST['p8_charset']."&".$_REQUEST['p9_signtype']."&".$signmsg; @$md5info_paramet = $_REQUEST['p1_usercode']."&".$_REQUEST['p2_order']."&".$_REQUEST['p3_money']."&".$_REQUEST['p4_status']."&".$_REQUEST['p5_jtpayorder']."&".$_REQUEST['p6_paymethod']."&".$_REQUEST['p7_paychannelnum']."&".$_REQUEST['p8_charset']."&".$_REQUEST['p9_signtype']."&".$signmsg;
$md5info_tem= strtoupper(md5($md5info_paramet)); $md5info_tem= strtoupper(md5($md5info_paramet));
$requestsign=$_REQUEST['p10_sign']; $requestsign=$_REQUEST['p10_sign'];
if ($md5info_tem == $_REQUEST['p10_sign']) if ($md5info_tem == $_REQUEST['p10_sign'])
{ {
$order_info['trade_no'] = $_REQUEST['p5_jtpayorder']; $order_info['trade_no'] = $_REQUEST['p5_jtpayorder'];
$order_info['out_trade_no'] = $_REQUEST['p2_order']; $order_info['out_trade_no'] = $_REQUEST['p2_order'];
$pay_where = substr($_REQUEST['p2_order'], 0, 2); $pay_where = substr($_REQUEST['p2_order'], 0, 2);
switch ($pay_where) { switch ($pay_where) {
case 'SP': case 'SP':
$result = $this->set_spend($order_info); $result = $this->set_spend($order_info);
break; break;
case 'PF': case 'PF':
$result = $this->set_deposit($order_info); $result = $this->set_deposit($order_info);
break; break;
case 'AG': case 'AG':
$result = $this->set_agent($order_info); $result = $this->set_agent($order_info);
break; break;
default: default:
exit('accident order data'); exit('accident order data');
break; break;
} }
//改变订单状态,及其他业务修改 //改变订单状态,及其他业务修改
echo "success"; echo "success";
//接收通知后必须输出”success“代表接收成功。 //接收通知后必须输出”success“代表接收成功。
}else{ }else{
$this->record_logs("竣付通验证失败!!"); $this->record_logs("竣付通验证失败!!");
} }
} }
/** /**
* 双乾回调 * 双乾回调
* @return [type] [description] * @return [type] [description]
*/ */
public function sq_callback(){ public function sq_callback(){
$merNo = I('MerNo'); $merNo = I('MerNo');
$amount = I('Amount'); $amount = I('Amount');
$billNo = I('BillNo'); // 平台订单号 $billNo = I('BillNo'); // 平台订单号
$orderNo = I('Orderno'); // 支付平台订单号 $orderNo = I('Orderno'); // 支付平台订单号
$succed = I('Succeed'); $succed = I('Succeed');
$result = I('Result'); $result = I('Result');
$bankOrderNo = I('bankOrderNo'); $bankOrderNo = I('bankOrderNo');
$merRemark = I('MerRemark'); $merRemark = I('MerRemark');
$md5Info = I('MD5info'); $md5Info = I('MD5info');
Log::write(serialize(I()), Log::DEBUG); Log::write(serialize(I()), Log::DEBUG);
// pp(C('sqpay.key')); // pp(C('sqpay.key'));
$secret = strtoupper(md5(C('sqpay.key')));//支付秘钥 $secret = strtoupper(md5(C('sqpay.key')));//支付秘钥
// 参与校验 // 参与校验
$sign = strtoupper(md5("Amount={$amount}&BillNo={$billNo}&MerNo={$merNo}&Succeed={$succed}&{$secret}")); $sign = strtoupper(md5("Amount={$amount}&BillNo={$billNo}&MerNo={$merNo}&Succeed={$succed}&{$secret}"));
if ($md5Info == $sign) if ($md5Info == $sign)
{ {
$order_info['trade_no'] = $orderNo; $order_info['trade_no'] = $orderNo;
$order_info['out_trade_no'] = $billNo; $order_info['out_trade_no'] = $billNo;
$pay_where = substr($billNo, 0, 2); $pay_where = substr($billNo, 0, 2);
switch ($pay_where) { switch ($pay_where) {
case 'SP': case 'SP':
$result = $this->set_spend($order_info); $result = $this->set_spend($order_info);
break; break;
case 'PF': case 'PF':
$result = $this->set_deposit($order_info); $result = $this->set_deposit($order_info);
break; break;
case 'AG': case 'AG':
$result = $this->set_agent($order_info); $result = $this->set_agent($order_info);
break; break;
default: default:
exit('accident order data'); exit('accident order data');
break; break;
} }
//改变订单状态,及其他业务修改 //改变订单状态,及其他业务修改
echo "success"; echo "success";
//接收通知后必须输出”success“代表接收成功。 //接收通知后必须输出”success“代表接收成功。
}else{ }else{
$this->record_logs("双乾验证失败!!"); $this->record_logs("双乾验证失败!!");
} }
} }
public function heepay_callback() public function heepay_callback()
@ -599,83 +624,83 @@ Log::write(serialize($order_info), Log::DEBUG);
//验证是否合法 //验证是否合法
if($Sign==$MySign){ if($Sign==$MySign){
$pay_where = substr($jinzhua,0,2); $pay_where = substr($jinzhua,0,2);
$order_info['trade_no']=$OrderID; $order_info['trade_no']=$OrderID;
$order_info['out_trade_no']=$jinzhua; $order_info['out_trade_no']=$jinzhua;
$result = false; $result = false;
switch ($pay_where) { switch ($pay_where) {
case 'SP': case 'SP':
$d=M('spend','tab_')->field('pay_amount')->where(['pay_order_number'=>$order_info['out_trade_no']])->find(); $d=M('spend','tab_')->field('pay_amount')->where(['pay_order_number'=>$order_info['out_trade_no']])->find();
if($d['pay_amount'] != $Money){ if($d['pay_amount'] != $Money){
$this->record_logs("金额验证错误"); $this->record_logs("金额验证错误");
echo '357papiSQLFALSE357papi';//失败 echo '357papiSQLFALSE357papi';//失败
return false; return false;
} }
$result = $this->set_spend($order_info); $result = $this->set_spend($order_info);
break; break;
case 'PF': case 'PF':
$d=M('deposit','tab_')->field('pay_amount')->where(['pay_order_number'=>$order_info['out_trade_no']])->find(); $d=M('deposit','tab_')->field('pay_amount')->where(['pay_order_number'=>$order_info['out_trade_no']])->find();
if($d['pay_amount'] != $Money){ if($d['pay_amount'] != $Money){
$this->record_logs("金额验证错误"); $this->record_logs("金额验证错误");
echo '357papiSQLFALSE357papi';//失败 echo '357papiSQLFALSE357papi';//失败
return false; return false;
} }
$result = $this->set_deposit($order_info); $result = $this->set_deposit($order_info);
break; break;
case 'AG': case 'AG':
$d=M('agent','tab_')->field('real_amount')->where(['pay_order_number'=>$order_info['out_trade_no']])->find(); $d=M('agent','tab_')->field('real_amount')->where(['pay_order_number'=>$order_info['out_trade_no']])->find();
if($d['real_amount'] != $Money){ if($d['real_amount'] != $Money){
$this->record_logs("金额验证错误"); $this->record_logs("金额验证错误");
echo '357papiSQLFALSE357papi';//失败 echo '357papiSQLFALSE357papi';//失败
return false; return false;
} }
$result = $this->set_agent($order_info); $result = $this->set_agent($order_info);
break; break;
case 'BR': case 'BR':
$d=M('bind_recharge','tab_')->field('real_amount')->where(['pay_order_number'=>$order_info['out_trade_no']])->find(); $d=M('bind_recharge','tab_')->field('real_amount')->where(['pay_order_number'=>$order_info['out_trade_no']])->find();
if($d['real_amount'] != $Money){ if($d['real_amount'] != $Money){
$this->record_logs("金额验证错误"); $this->record_logs("金额验证错误");
echo '357papiSQLFALSE357papi';//失败 echo '357papiSQLFALSE357papi';//失败
return false; return false;
} }
$result = $this->set_bind_recharge($order_info); $result = $this->set_bind_recharge($order_info);
break; break;
case 'TB': case 'TB':
$d=M('balance','tab_')->field('money')->where(['pay_order_number'=>$order_info['out_trade_no']])->find(); $d=M('balance','tab_')->field('money')->where(['pay_order_number'=>$order_info['out_trade_no']])->find();
if($d['money'] != $Money){ if($d['money'] != $Money){
$this->record_logs("金额验证错误"); $this->record_logs("金额验证错误");
echo '357papiSQLFALSE357papi';//失败 echo '357papiSQLFALSE357papi';//失败
return false; return false;
} }
$result = $this->set_balance($order_info); $result = $this->set_balance($order_info);
break; break;
case 'SI': case 'SI':
$d=M('order','tab_')->field('order_price')->where(['order_number'=>$order_info['out_trade_no']])->find(); $d=M('order','tab_')->field('order_price')->where(['order_number'=>$order_info['out_trade_no']])->find();
if($d['order_price'] != $Money){ if($d['order_price'] != $Money){
$this->record_logs("金额验证错误"); $this->record_logs("金额验证错误");
echo '357papiSQLFALSE357papi';//失败 echo '357papiSQLFALSE357papi';//失败
return false; return false;
} }
$result = $this->set_order($order_info);
break;
default:
exit('accident order data');
break;
}
if($result){ $result = $this->set_order($order_info);
break;
default:
exit('accident order data');
break;
}
if($result){
echo '357papiSuccess357papi';//成功 echo '357papiSuccess357papi';//成功
return; return;
} }
else{ else{
echo '357papiSQLFALSE357papi';//失败 echo '357papiSQLFALSE357papi';//失败
return; return;
} }
}else{ }else{
echo '357papiAPIFALSE357papi';//失败 echo '357papiAPIFALSE357papi';//失败
@ -718,8 +743,8 @@ Log::write(serialize($order_info), Log::DEBUG);
} }
} }
//判断订单是否存在 //判断订单是否存在
public function order_is_exist($out_trade_no) public function order_is_exist($out_trade_no)
{ {
@ -797,8 +822,8 @@ Log::write(serialize($order_info), Log::DEBUG);
} }
/** /**
*WAP支付成功后 通知SDK *WAP支付成功后 通知SDK
*/ */
public function notifySdk($stauts='200',$info=''){ public function notifySdk($stauts='200',$info=''){
return ""; return "";
} }
@ -817,7 +842,7 @@ Log::write(serialize($order_info), Log::DEBUG);
} }
} }
//判断充值是否存在 //判断充值是否存在
public function bind_recharge_is_exist($out_trade_no) public function bind_recharge_is_exist($out_trade_no)
{ {
$bind_recharge = M('bind_recharge', 'tab_'); $bind_recharge = M('bind_recharge', 'tab_');

@ -270,7 +270,8 @@ class CoinOrderController extends BaseController
//官方 //官方
header("Content-type:text/html;charset=utf-8"); header("Content-type:text/html;charset=utf-8");
Vendor("WxPayPubHelper.WxPayPubHelper"); Vendor("WxPayPubHelper.WxPayPubHelper");
$unifiedOrder = new \UnifiedOrder_pub("wx0ba5be5c8bb9f1b7", "1555280551","wDst6e8d0nGUh4hcwBgv8caJmDE1Mxql"); //$unifiedOrder = new \UnifiedOrder_pub("wx0ba5be5c8bb9f1b7", "1555280551","wDst6e8d0nGUh4hcwBgv8caJmDE1Mxql");
$unifiedOrder = new \UnifiedOrder_pub(C("wei_xin.email"), C("wei_xin.partner"),C("wei_xin.key"));
// $des='平台币充值'; // $des='平台币充值';
$unifiedOrder->setParameter("body", $title);//商品描述 $unifiedOrder->setParameter("body", $title);//商品描述
//自定义订单号,此处仅作举例 //自定义订单号,此处仅作举例

@ -1,5 +1,6 @@
<?php <?php
namespace Sdk\Controller; namespace Sdk\Controller;
use Org\WeixinSDK\Weixin;
use Think\Controller; use Think\Controller;
use Org\Ipa365SDK\Ipa365; use Org\Ipa365SDK\Ipa365;
use Mobile\Controller\SsgController; use Mobile\Controller\SsgController;
@ -120,14 +121,15 @@ class Ipa365Controller extends BaseController{
'game_id' => $gameId, 'game_id' => $gameId,
'pay_status' => 0 'pay_status' => 0
))->find(); ))->find();
$gameInfo = M('game', 'tab_')->field('game_name,supersign_token')->where(array(
'id' => $gameId,
))->find();
if ($payLog) { if ($payLog) {
$orderId = $payLog['order_id']; $orderId = $payLog['order_id'];
} else { } else {
$orderId = "SS_" . date('Ymd') . date('His') . sp_random_string(4); // 超级签 $orderId = "SS_" . date('Ymd') . date('His') . sp_random_string(4); // 超级签
$gameInfo = M('game', 'tab_')->field('supersign_token')->where(array(
'id' => $gameId,
))->find();
if (!$gameInfo['supersign_token']) { if (!$gameInfo['supersign_token']) {
$this->error("超级签token未填写"); $this->error("超级签token未填写");
} }
@ -158,17 +160,22 @@ class Ipa365Controller extends BaseController{
$param['payway'] = 1; $param['payway'] = 1;
$param['title'] = $price; $param['title'] = $price;
$param['body'] = $price; $param['body'] = $price;
$param['callback'] = "https://m.wmtxkj.com/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}"; //$param['callback'] = "https://m.wmtxkj.com/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
$param['notifyurl'] = "https://m.wmtxkj.com/callback.php/Notify/notify/apitype/alipay"; //$param['notifyurl'] = "https://m.wmtxkj.com/callback.php/Notify/notify/apitype/alipay";
$param['callback'] = "https://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
$param['notifyurl'] = "https://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
$ret = $this->alipay($param); $ret = $this->alipay($param);
$this->assign("url", $ret['url']);
$weixn = new Weixin();
$wx_pay = json_decode($weixn->weixin_pay('超级签消费', $orderId, $price, 'MWEB', 4), true);
$this->assign("wxurl", $wx_pay['mweb_url']);
$this->assign("price", self::signprice); $this->assign("price", self::signprice);
$this->assign("url", $ret['url']); $this->assign("order_id", $orderId);
$this->assign("order_id", $orderId); $this->assign("game_name",$gameInfo['game_name']);
$this->assign("callback",$param['callback']);
// pp($orderId);
// redirect($ret['url']);
$this->display(); $this->display();
} }
@ -209,12 +216,19 @@ class Ipa365Controller extends BaseController{
$param['payway'] = 1; $param['payway'] = 1;
$param['title'] = $price; $param['title'] = $price;
$param['body'] = $price; $param['body'] = $price;
$param['callback'] = "https://m.wmtxkj.com/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}"; //$param['callback'] = "https://m.wmtxkj.com/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
$param['notifyurl'] = "https://m.wmtxkj.com/callback.php/Notify/notify/apitype/alipay"; //$param['notifyurl'] = "https://m.wmtxkj.com/callback.php/Notify/notify/apitype/alipay";
$param['callback'] = "https://".$_SERVER['HTTP_HOST']."/sdk.php/Ipa365/install_show/user_id/{$userId}/game_id/{$gameId}/order_id/{$orderId}";
$param['notifyurl'] = "https://".$_SERVER['HTTP_HOST']."/callback.php/Notify/notify/apitype/alipay";
$ret = $this->alipay($param); $ret = $this->alipay($param);
$this->assign("url", $ret['url']); $this->assign("url", $ret['url']);
$weixn = new Weixin();
$wx_pay = json_decode($weixn->weixin_pay('超级签消费', $orderId, $price, 'MWEB', 4), true);
$this->assign("wxurl", $wx_pay['mweb_url']);
$this->assign("price", $price); $this->assign("price", $price);
$this->assign("order_id", $payLog['order_id']); $this->assign("order_id", $payLog['order_id']);
$this->assign("game_id", $payLog['game_id']); $this->assign("game_id", $payLog['game_id']);
@ -393,7 +407,7 @@ class Ipa365Controller extends BaseController{
->setUserId($param['user_id']) ->setUserId($param['user_id'])
->setSdkVersion($param['sdk_version']); ->setSdkVersion($param['sdk_version']);
$pay_['url']= $pay->buildRequestForm($vo); $pay_['url']= $pay->buildRequestForm($vo);
$pay_['out_trade_no']= $out_trade_no; //$pay_['out_trade_no']= $out_trade_no;
return $pay_; return $pay_;
} }

@ -40,8 +40,8 @@ body{
</div> </div>
</div> --> </div> -->
<div class="title" > <div class="title" >
<img class="gologin" src="__IMG__/ssg/alipay/back.png" style="margin-left:.24rem;"> <img class="gologin" src="__IMG__/ssg/alipay/back.png" style="margin-left:.24rem;" onclick="javascript:history.go(-1)">
<div style="font-size: .32rem;color: #fff;">天宫计</div> <div style="font-size: .32rem;color: #fff;">{$game_name}</div>
<div class="titleright" style="margin-right:.24rem;"></div> <div class="titleright" style="margin-right:.24rem;"></div>
</div> </div>
<!-- 其他通道 --> <!-- 其他通道 -->
@ -74,22 +74,22 @@ body{
</div> </div>
</div> </div>
<!-- 微信回调弹框 --> <!-- 微信回调弹框 -->
<div id="alert_box" style="height: 100vh;background:rgba(41,41,41,.8);position:fixed;z-index:9999;top: 0px;width: 100%;"> <div id="alert_box" style="height: 100vh;background:rgba(41,41,41,.8);position:fixed;z-index:9999;top: 0px;width: 100%;" hidden>
<div style="top:50%;margin-top: -1.5rem;position: fixed;width: 6.3rem;left: 50%;margin-left: -3.2rem;background-color: #fff;border-radius:.3rem;"> <div style="top:50%;margin-top: -1.5rem;position: fixed;width: 6.3rem;left: 50%;margin-left: -3.2rem;background-color: #fff;border-radius:.3rem;">
<img onclick="closeAlert()" src="__IMG__/ssg/alipay/close.png" style="width: .3rem;height: .3rem;position: absolute;left: .3rem;top: .3rem;"> <img onclick="closeAlert()" src="__IMG__/ssg/alipay/close.png" style="width: .3rem;height: .3rem;position: absolute;left: .3rem;top: .3rem;">
<div style="line-height:1.4rem;font-size:.32rem;text-align: center;"> <div style="line-height:1.4rem;font-size:.32rem;text-align: center;">
请确认微信支付是否已完成 请确认微信支付是否已完成
</div> </div>
<a href="javascript:" style="line-height:1rem;font-size:.28rem;text-align: center;color: red;width: 100%;display: block;border-top: 1px solid #f5f5f5;border-bottom: 1px solid #f5f5f5;"> <a href="{$callback}" style="line-height:1rem;font-size:.28rem;text-align: center;color: red;width: 100%;display: block;border-top: 1px solid #f5f5f5;border-bottom: 1px solid #f5f5f5;">
已完成支付 已完成支付
</a> </a>
<a href="javascript:" style="line-height:1rem;font-size:.28rem;text-align: center;color: #A9A9A9;width: 100%;display: block;"> <a href="javascript:" style="line-height:1rem;font-size:.28rem;text-align: center;color: #A9A9A9;width: 100%;display: block;" onclick="javascript;location.reload();">
支付遇到问题,重新支付 支付遇到问题,重新支付
</a> </a>
</div> </div>
</div> </div>
<!-- 触屏订单通道 --> <!-- 触屏订单通道 -->
<div class="m-order hidden"> <div class="m-order">
<div style="padding: .3rem;"> <div style="padding: .3rem;">
<div style="width: 6.9rem;height: 1.7rem;background-color: #fff;border-radius:10px;margin: auto;font-size: .28rem;color:#292929;"> <div style="width: 6.9rem;height: 1.7rem;background-color: #fff;border-radius:10px;margin: auto;font-size: .28rem;color:#292929;">
<div style="display: flex;height: .8rem; justify-content: space-between;align-items:center;padding: 0 .3rem;"> <div style="display: flex;height: .8rem; justify-content: space-between;align-items:center;padding: 0 .3rem;">
@ -108,7 +108,7 @@ body{
<span>{$price}</span> <span>{$price}</span>
</div> </div>
<a class="order-payinfo-item" <a class="order-payinfo-item"
href="#;" onclick="jump('{$url}', '{$order_id}')" href="#;" onclick="jump('{$url}', '{$order_id}','alipay')"
title="支付宝" style="padding: .3rem 0;width: 6.3rem;margin-left: .3rem;"> title="支付宝" style="padding: .3rem 0;width: 6.3rem;margin-left: .3rem;">
<div class="order-payinfo-icon" style="width: .7rem;height: .7rem;"> <div class="order-payinfo-icon" style="width: .7rem;height: .7rem;">
<img src="__IMG__/ssg/alipay/zfb-pic.jpg" style="width: 100%;height: 100%;border: 0px;" alt="支付宝"> <img src="__IMG__/ssg/alipay/zfb-pic.jpg" style="width: 100%;height: 100%;border: 0px;" alt="支付宝">
@ -118,8 +118,9 @@ body{
<div class="pay-meta">推荐支付宝用户使用</div> <div class="pay-meta">推荐支付宝用户使用</div>
</div> </div>
</a> </a>
<if condition="$wxurl neq ''">
<a class="order-payinfo-item" <a class="order-payinfo-item"
href="#;" onclick="jump('{$url}', '{$order_id}')" href="#;" onclick="jump('{$wxurl}', '{$order_id}','wxpay')"
title="微信支付" style="padding: .3rem 0;width: 6.3rem;margin-left: .3rem;"> title="微信支付" style="padding: .3rem 0;width: 6.3rem;margin-left: .3rem;">
<div class="order-payinfo-icon" style="width: .7rem;height: .7rem;"> <div class="order-payinfo-icon" style="width: .7rem;height: .7rem;">
<img src="__IMG__/ssg/alipay/wxpay.png" style="width: 100%;height: 100%;border: 0px;" alt="微信支付"> <img src="__IMG__/ssg/alipay/wxpay.png" style="width: 100%;height: 100%;border: 0px;" alt="微信支付">
@ -129,19 +130,26 @@ body{
<div class="pay-meta">推荐微信用户使用</div> <div class="pay-meta">推荐微信用户使用</div>
</div> </div>
</a> </a>
</if>
</div> </div>
</div> </div>
<!-- <div class="footer-pay"> <!--<div class="footer-pay">
<p>海南万盟天下科技有限公司 版权所有 ©2019 支付中心</p> <p>海南万盟天下科技有限公司 版权所有 ©2019 支付中心</p>
</div> --> </div>-->
</body> </body>
<script> <script>
function jump(pay_url, order_id) { function jump(pay_url, order_id,paytype='alipay') {
if(isWeiXin()){ if(paytype=='alipay'){
window.location.href = pay_url;
}else{
showAlert();
window.open(pay_url,"_blank");
}
/*if(isWeiXin()){
window.location.href = "/sdk.php/Ipa365/paytip/order_id/"+order_id; window.location.href = "/sdk.php/Ipa365/paytip/order_id/"+order_id;
}else{ }else{
window.location.href=pay_url; window.location.href=pay_url;
} }*/
} }
//判断是否是微信浏览器的函数 //判断是否是微信浏览器的函数
function isWeiXin(){ function isWeiXin(){

@ -21,8 +21,7 @@ class Weixin
// $data['pay_type'] = "weixin"; // $data['pay_type'] = "weixin";
//使用统一支付接口 //使用统一支付接口
if ($tt == 1 || $tt == 4) { //扫码 || 超级签h5
if ($tt == 1) { //扫码
$notifyy="notify"; $notifyy="notify";
$unifiedOrder = new \UnifiedOrder_pub(C('wei_xin.email'), C('wei_xin.partner'), C('wei_xin.key')); $unifiedOrder = new \UnifiedOrder_pub(C('wei_xin.email'), C('wei_xin.partner'), C('wei_xin.key'));
@ -47,7 +46,11 @@ class Weixin
$unifiedOrder->setParameter("total_fee", $pay_amount * 100);//总金额 $unifiedOrder->setParameter("total_fee", $pay_amount * 100);//总金额
$unifiedOrder->setParameter("notify_url", "http://" . $_SERVER['HTTP_HOST'] . "/callback.php/Notify/wxpay_callback/method/".$notifyy);//通知地址 if($tt==4){
$unifiedOrder->setParameter("notify_url", "http://" . $_SERVER['HTTP_HOST'] . "/callback.php/Notify/supersign_wxpay_notify");//通知地址
}else{
$unifiedOrder->setParameter("notify_url", "http://" . $_SERVER['HTTP_HOST'] . "/callback.php/Notify/wxpay_callback/method/".$notifyy);//通知地址
}
$unifiedOrder->setParameter("trade_type", $trade_type);//交易类型 $unifiedOrder->setParameter("trade_type", $trade_type);//交易类型

Loading…
Cancel
Save