<?php
//ini_set("error_reporting","E_ALL & ~E_NOTICE");
var_dump($_GET);

$key = "5eth1mfk53ibm2xhjz3uejer91t6";//通讯密钥
$host = "https://".$_SERVER['HTTP_HOST']."/createOrder";//创建订单地址【不可更改】
$mid ='1012';//商户ID
$notifyUrl = 'https://'.$_SERVER['HTTP_HOST'].'/budpay/notify.php';//异步回调地址改成您自己的
$returnUrl = 'https://'.$_SERVER['HTTP_HOST'].'/budpay/return.php';//同步回调地址改成您自己的
//$p = "mid=".$mid."&payId=".$_GET['payId'].'&param='.$_GET['param'].'&type='.$_GET['type']."&price=".$_GET['price'].'&sign='.$sign.'&isHtml=1'."&notifyUrl=".$notifyUrl."&returnUrl=".$returnUrl.";

$sign = md5($mid.$_GET['payId'].$_GET['param'].$_GET['type'].$_GET['price'].$key);
$p = "mid=".$mid."&payId=".$_GET['payId'].'&param='.$_GET['param'].'&type='.$_GET['type']."&price=".$_GET['price'].'&sign='.$sign.'&notifyUrl='.$notifyUrl.'&returnUrl='.$returnUrl.'&isHtml=1';
$url = $host . '?'. $p;
header("location:$url");

//echo "<script>window.location.href = '".$host."?".$p."'</script>";

