Beispiel #1
0
//付款账号
$email = $_POST['WIDemail'];
//必填
//付款账户名
$account_name = $_POST['WIDaccount_name'];
//必填,个人支付宝账号是真实姓名公司支付宝账号是公司名称
//付款当天日期
$pay_date = $_POST['WIDpay_date'];
//必填,格式:年[4位]月[2位]日[2位],如:20100801
//批次号
$batch_no = $_POST['WIDbatch_no'];
//必填,格式:当天日期[8位]+序列号[3至16位],如:201008010000001
//付款总金额
$batch_fee = $_POST['WIDbatch_fee'];
//必填,即参数detail_data的值中所有金额的总和
//付款笔数
$batch_num = $_POST['WIDbatch_num'];
//必填,即参数detail_data的值中,“|”字符出现的数量加1,最大支持1000笔(即“|”字符出现的数量999个)
//付款详细数据
$detail_data = $_POST['WIDdetail_data'];
//必填,格式:流水号1^收款方帐号1^真实姓名^付款金额1^备注说明1|流水号2^收款方帐号2^真实姓名^付款金额2^备注说明2....
/************************************************************/
//构造要请求的参数数组,无需改动
$parameter = array("service" => "batch_trans_notify", "partner" => trim($alipay_config['partner']), "notify_url" => $notify_url, "email" => $email, "account_name" => $account_name, "pay_date" => $pay_date, "batch_no" => $batch_no, "batch_fee" => $batch_fee, "batch_num" => $batch_num, "detail_data" => $detail_data, "_input_charset" => trim(strtolower($alipay_config['input_charset'])));
//建立请求
$alipaySubmit = new AlipaySubmit($alipay_config);
$html_text = $alipaySubmit->getHttpResponsePOST($parameter);
echo $html_text;
?>
</body>
</html>