支付域名

master
tpingzhang 5 years ago
parent f232f41138
commit b04b6eae28

@ -96,7 +96,7 @@ $config = array(
), //附件上传配置(文件上传类配置)
'ADMIN_DOMAIN' => 'http://mg.wmtxkj.cn/',
'WX_PAY_LIMIT' => 3000,
'CALLBACK_PAY' => 'https://api.wmtxkj.cn/'
'PAY_DOMAIN' => 'https://api.wmtxkj.cn/'
);
return $config;
/* $pay = include(APP_PATH . "/Sdk/Conf/pay.php");

@ -184,7 +184,7 @@ class AppleController extends BaseController{
$data['paymenttype'] = "ZFBZF";
$data['MerRemark'] = "mark";
$data['subject'] = "游戏充值";
$data['notifyurl'] =C('pay_header')."/callback.php/Notify/sq_callback";//通知
$data['notifyurl'] = C('PAY_DOMAIN')."/callback.php/Notify/sq_callback";//通知
$data['returnurl'] = $returl;
$data['mchAppId'] = "wmtxkj.com";
$data['mchAppName'] = "mchAppName";

@ -127,7 +127,7 @@ class WapPayController extends BaseController{
$this->add_deposit($request);
}
$sqpay=new Sqpay();
$returl = C('pay_header'). "/sdk.php/Spend/pay_success/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
$returl = C('PAY_DOMAIN'). "/sdk.php/Spend/pay_success/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
$data['secret'] = C("sqpay.key");
$data['merno'] = C("sqpay.partner");
$data['amount'] = $request['price'];
@ -135,7 +135,7 @@ class WapPayController extends BaseController{
$data['paymenttype'] = "ZFBZF";
$data['MerRemark'] = "mark";
$data['subject'] = "subject";
$data['notifyurl'] = C('pay_header')."/callback.php/Notify/sq_callback";//通知
$data['notifyurl'] = C('PAY_DOMAIN')."/callback.php/Notify/sq_callback";//通知
$data['returnurl'] = $returl;
$data['mchAppId'] = "wmtxkj.com";
$data['mchAppName'] = "mchAppName";
@ -554,8 +554,7 @@ class WapPayController extends BaseController{
/**
*微信支付
*/
public function weixin_pay()
{
public function weixin_pay() {
#获取SDK上POST方式传过来的数据 然后base64解密 然后将json字符串转化成数组
$request = json_decode(base64_decode(file_get_contents("php://input")), true);
/* file_put_contents(dirname(__FILE__) . '/weixin_paywap.txt',json_encode($request)); */
@ -626,19 +625,20 @@ class WapPayController extends BaseController{
$json_data['paytype'] = "wx";
}else{
if(!empty($request['scheme'])) {
$redirect_url = 'https://api.wmtxkj.com' . "/sdk.php/Spend/pay_success2/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
$redirect_url = C('PAY_DOMAIN') . "/sdk.php/Spend/pay_success2/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
} else {
$redirect_url = 'https://api.wmtxkj.com' . "/sdk.php/Spend/pay_success/orderno/".$request['pay_order_number'];
$redirect_url = C('PAY_DOMAIN') . "/sdk.php/Spend/pay_success/orderno/".$request['pay_order_number'];
}
$json_data['url'] = $is_pay['mweb_url'].'&redirect_url='.urlencode( $redirect_url );
$json_data['paytype'] ="wx";
}
}else{
$json_data['status'] = 500;
$json_data['url'] = "https://" . 'api.wmtxkj.com';
$json_data['url'] = C('PAY_DOMAIN');
}
$json_data['cal_url'] = 'https://api.wmtxkj.com';
echo base64_encode(json_encode($json_data));exit;
$json_data['cal_url'] = C('PAY_DOMAIN');
echo base64_encode(json_encode($json_data));
exit;
// $this->redirect('WapPay/weixin_pay_view',['user_id'=>$request['user_id'],'game_id'=>$request['game_id']]);
} else if(get_wx_pay_type() == 1){ // 威富通
if( empty(C('heepay.partner'))||empty(C('heepay.key'))){
@ -740,7 +740,7 @@ class WapPayController extends BaseController{
$json_data['status'] = 500;
$json_data['msg']=$res['info'];
$json_data['url']='http://'.$_SERVER ['HTTP_HOST'];
$json_data['cal_url'] = C("pay_header");
$json_data['cal_url'] = C("PAY_DOMAIN");
}
echo base64_encode(json_encode($json_data)); exit;
@ -1016,7 +1016,8 @@ class WapPayController extends BaseController{
$data['merno'] = C('sqpay.partner');
$data['subject'] = '游戏充值';
$data['ip'] = get_client_ip();
$data['returnurl'] = C('pay_header'). "/sdk.php/Spend/pay_success/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
$data['returnurl'] = C('PAY_DOMAIN'). "/sdk.php/Spend/pay_success/orderno/".$request['pay_order_number'].'/game_id/'.$request['game_id'];
$data['notifyurl'] = C('PAY_DOMAIN')."/callback.php/Notify/sq_callback";
$data['amount'] = $request['price'];
$data['appId'] = C('wei_xin.email');
$data['secret'] = C('sqpay.key');

@ -229,7 +229,7 @@ function small_program(status) {
return false;
}
return false;
return true;
}
$(function() {

@ -44,9 +44,9 @@ class Sqpay
public function sq_wxsmallpay($data){
Log::write("wxpay:".serialize($_REQUEST), Log::DEBUG);
$returnurl = empty($data['returnurl'])?"http://".$_SERVER['HTTP_HOST']:$data['returnurl'];//成功跳转
$returnurl = $data['returnurl'];//成功跳转
$notifyurl = "http://".$_SERVER['HTTP_HOST']."/callback.php/Notify/sq_callback"; //通知
$notifyurl =$data['notifyurl']; //通知
$ordertime =date("Ymdhms",time());
// 168885 12345678
$sign = md5("Amount={$data['amount']}&BillNo={$data['order_no']}&MerNo={$data['merno']}&PayType=SMZF&".strtoupper(md5($data['secret'])));

Loading…
Cancel
Save