微信端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&"; } } '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&"; } }
暂无评论