下面这句什么意思呢 PHP支付返回处理 PHP小白不懂 求大神解释下哈?
下面这句什么意思呢PHP支付返回处理accountClass::OnlineReturn(array("trade_no"=>$TransID));PHP小白不懂求大神解...
下面这句什么意思呢 PHP支付返回处理
accountClass::OnlineReturn(array("trade_no"=>$TransID));
PHP小白不懂 求大神解释下哈?
代码:
<?
ob_start();
require_once ('../../core/config.inc.php');
require_once (ROOT_PATH.'modules/account/account.class.php');
require_once (ROOT_PATH.'modules/payment/payment.class.php');
$result = paymentClass::GetOne(array("nid"=>"baofoo"));
$MemberID=$_REQUEST['MemberID'];//商户号
$TerminalID =$_REQUEST['TerminalID'];//商户终端号
$TransID =$_REQUEST['TransID'];//流水号
$Result=$_REQUEST['Result'];//支付结果
$ResultDesc=$_REQUEST['ResultDesc'];//支付结果描述
$FactMoney=$_REQUEST['FactMoney'];//实际成功金额
$AdditionalInfo=$_REQUEST['AdditionalInfo'];//订单附加消息
$SuccTime=$_REQUEST['SuccTime'];//支付完成时间
$Md5Sign=$_REQUEST['Md5Sign'];//md5签名
$Md5key = "141313";
$MARK = "~|~";
//MD5签名格式
$WaitSign=md5('MemberID='.$MemberID.$MARK.'TerminalID='.$TerminalID.$MARK.'TransID='.$TransID.$MARK.'Result='.$Result.$MARK.'ResultDesc='.$ResultDesc.$MARK.'FactMoney='.$FactMoney.$MARK.'AdditionalInfo='.$AdditionalInfo.$MARK.'SuccTime='.$SuccTime.$MARK.'Md5Sign='.$Md5key);
/**
* 判断返回信息,如果支付成功,并且支付结果可信,则做进一步的处理
*/
if ($Md5Sign == $WaitSign) {
accountClass::OnlineReturn(array("trade_no"=>$TransID));
$msg = "支付成功";
echo "<script>alert('{$msg}');location.href='/index.php?user&q=code/account/log';</script>";
//支付成功,可进行逻辑处理!
//商户系统的逻辑处理(例如判断金额,判断支付状态,更新订单状态等等)......
}else{
$msg = "支付失败";
echo "<script>alert('{$msg}');location.href='/index.php?user&q=code/account/log';</script>";
}
?> 展开
accountClass::OnlineReturn(array("trade_no"=>$TransID));
PHP小白不懂 求大神解释下哈?
代码:
<?
ob_start();
require_once ('../../core/config.inc.php');
require_once (ROOT_PATH.'modules/account/account.class.php');
require_once (ROOT_PATH.'modules/payment/payment.class.php');
$result = paymentClass::GetOne(array("nid"=>"baofoo"));
$MemberID=$_REQUEST['MemberID'];//商户号
$TerminalID =$_REQUEST['TerminalID'];//商户终端号
$TransID =$_REQUEST['TransID'];//流水号
$Result=$_REQUEST['Result'];//支付结果
$ResultDesc=$_REQUEST['ResultDesc'];//支付结果描述
$FactMoney=$_REQUEST['FactMoney'];//实际成功金额
$AdditionalInfo=$_REQUEST['AdditionalInfo'];//订单附加消息
$SuccTime=$_REQUEST['SuccTime'];//支付完成时间
$Md5Sign=$_REQUEST['Md5Sign'];//md5签名
$Md5key = "141313";
$MARK = "~|~";
//MD5签名格式
$WaitSign=md5('MemberID='.$MemberID.$MARK.'TerminalID='.$TerminalID.$MARK.'TransID='.$TransID.$MARK.'Result='.$Result.$MARK.'ResultDesc='.$ResultDesc.$MARK.'FactMoney='.$FactMoney.$MARK.'AdditionalInfo='.$AdditionalInfo.$MARK.'SuccTime='.$SuccTime.$MARK.'Md5Sign='.$Md5key);
/**
* 判断返回信息,如果支付成功,并且支付结果可信,则做进一步的处理
*/
if ($Md5Sign == $WaitSign) {
accountClass::OnlineReturn(array("trade_no"=>$TransID));
$msg = "支付成功";
echo "<script>alert('{$msg}');location.href='/index.php?user&q=code/account/log';</script>";
//支付成功,可进行逻辑处理!
//商户系统的逻辑处理(例如判断金额,判断支付状态,更新订单状态等等)......
}else{
$msg = "支付失败";
echo "<script>alert('{$msg}');location.href='/index.php?user&q=code/account/log';</script>";
}
?> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询