【文件属性】:
文件名称:微信端api支付
文件大小:24KB
文件格式:PHP
更新时间:2021-01-28 11:32:29
api
//支付源码下载:http://www.sucaihuo.com/php/1196.html
public function buildRequestForm(\Think\Pay\PayVo $vo) {
$param = array(
'service' => 'create_direct_pay_by_user',
'payment_type' => '1',
'_input_charset' => 'utf-8',
'seller_email' => $this->config['email'],
'partner' => $this->config['partner'],
'notify_url' => $this->config['notify_url'],
'return_url' => $this->config['return_url'],
'out_trade_no' => $vo->getOrderNo(),
'subject' => $vo->getTitle(),
'body' => $vo->getBody(),
'total_fee' => $vo->getFee()
);
ksort($param);
reset($param);
$arg = '';
foreach ($param as $key => $value) {
if ($value) {
$arg .= "$key=$value&";
}
}