由于帝国下载系统没有支付宝接口,故自行添加。修改后。发现付款成功后转跳到帝国网页提示充值成功,但是后台没有记录。也没有充值到账的点卡初步怀疑是payend.php问题。希望知道的人能帮忙解决。。。[code][/code]<?php require("../../class/connect.php"); include("../../data/cache/public.php"); include("../../class/db_sql.php"); include("../../class/q_functions.php"); include("../../class/user.php"); include("../../data/cache/MemberLevel.php"); $link=db_connect(); $empire=new mysqlquery(); $editor=1;
//订单号 if(!getcvar('checkpaysession')) { printerror('非法操作','../../',1); } else { esetcookie("checkpaysession","",0); } //是否登陆 $user=islogin(); //操作事件 $phome=getcvar('payphome'); if($phome=='BuyGroupPay')//购买点数 {} else { printerror('您来自的链接不存在','',1); }
$paytype='chinabank'; $payr=$empire->fetch1("select * from {$dbtbpre}downpayapi where paytype='$paytype' limit 1");
$bargainor_id='';//商户号
$paykey=';//密钥
$seller_email=;//卖家支付宝帐户
//----------------------------------------------返回信息
if(!empty($_POST)) { foreach($_POST as $key => $data) { $_GET[$key]=$data; } }
$get_seller_email=rawurldecode($_GET['seller_email']);
//支付验证 ksort($_GET); reset($_GET);
$sign=''; foreach($_GET AS $key=>$val) { if($key!='sign'&&$key!='sign_type'&&$key!='code') { $sign.="$key=$val&"; } }
$sign=md5(substr($sign,0,-1).$paykey); if($sign!=$_GET['sign']) { printerror('验证MD5签名失败.','../../../',1,0,1); }
if(!($_GET['trade_status']=="TRADE_FINISHED"||$_GET['trade_status']=="WAIT_SELLER_SEND_GOODS"||$_GET['trade_status']=="TRADE_SUCCESS")) { printerror('支付失败.','../../../',1,0,1); }
//----------- 支付成功后处理 -----------
include('../payfun.php');
$orderid=$v_oid; //支付订单 $ddno=$remark1; //网站的订单号 $money=$v_amount;
if($phome=='BuyGroupPay')//购买充值类型 { $bgid=(int)getcvar('paymoneybgid'); PayApiBuyGroupPay($bgid,$money,$orderid,$user[userid],$user[username],$user[groupid],$paytype); }
db_close(); $empire=null; ?>
|