예제 #1
0
//交易展示URL
$describe = $_GET['describe'];
//交易描述
$trade_status = $_GET['trade_status'];
//交易状态
$trade_no = $_GET['trade_no'];
//交易参考号
$gmt_create = $_GET['gmt_create'];
//交易创建时间
$gmt_payment = $_GET['gmt_payment'];
//买家付款时间
$sign = $_GET['sign'];
//签名
$show_msg = "";
//如果加密后的串和网关返回的加密串一致,证明数据来源合法
$epu = new EBCPlugUtil();
$sign_n = $epu->getTradeNotifySign($ebc_key, $notify_id, $notify_time, $charset, $sign_type, $version, $out_trade_no, $total_fee, $payment_type, $show_url, $describe, $trade_status, $trade_no, $gmt_create, $gmt_payment);
if ($sign_n == $sign) {
    $show_msg = "<font color=blue>交易返回数据验证成功!</font>";
    if ($trade_status == '00') {
        Helper_Archive::paySuccess($orderid, $paySource, $_POST);
    }
} else {
    $show_msg = "<font color=red>交易返回数据验证失败!请核实数据来源正确!</font>";
}
?>
<html>
<head>
<title>交易.返回_<?php 
echo $g_title;
?>
예제 #2
0
$out_trade_no;
//外部交易号
$total_fee;
//交易总金额
$payment_type;
//支付类型
$show_url;
//交易展示URL
$describe;
//交易描述
$return_url;
//返回URL
$ebc_trade_url;
$out_trade_no = $_POST['ordersn'];
$total_fee = $_POST['price'];
$payment_type = 'sale';
$show_url = $_POST['show_url'];
$describe = $_POST['subject'];
$return_url = $GLOBALS['cfg_basehost'] . '/thirdpay/qianbao/EBCNotify.php';
//交易数据签名
$epu = new EBCPlugUtil();
$ebc_trade_url = $epu->getTradeUrl($ebc_gateway_trade, $ebc_partner, $ebc_key, $ebc_charset, $ebc_sign_type, $ebc_trade_version, $out_trade_no, $total_fee, $payment_type, $show_url, $describe, $return_url);
?>

<script type="text/javascript" language="javascript">
//将打包后的数据,转到EBC支付网关
window.location.href="<?php 
echo $ebc_trade_url;
?>
";
</script>