示例#1
0
 public function buildRequestForm(\Think\Pay\PayVo $vo)
 {
     $param = array('inputCharset' => '1', 'pageUrl' => $this->config['return_url'], 'bgUrl' => $this->config['notify_url'], 'version' => 'v2.0', 'language' => 1, 'signType' => 1, 'merchantAcctId' => $vo->config['partner'], 'orderId' => $vo->getOrderNo(), 'orderAmount' => $vo->getFee() * 100, 'orderTime' => date("Ymdhis"), 'productName' => $vo->getTitle(), 'productDesc' => $vo->getBody(), 'payType' => '00');
     $param['signMsg'] = $this->createSign($param);
     $sHtml = $this->_buildForm($param, $this->gateway);
     return $sHtml;
 }
示例#2
0
 public function buildRequestForm(\Think\Pay\PayVo $vo)
 {
     $param = array('p0_Cmd' => 'Buy', 'p1_MerId' => $this->config['partner'], 'p4_Cur' => 'CNY', 'p8_Url' => $this->config['return_url'], 'p2_Order' => $vo->getOrderNo(), 'p5_Pid' => $this->toGbk($vo->getTitle()), 'p3_Amt' => $vo->getFee(), 'p7_Pdesc' => $this->toGbk($vo->getBody()), 'pr_NeedResponse' => 1);
     $param['hmac'] = $this->createSign($param);
     $sHtml = $this->_buildForm($param, $this->gateway, 'post', 'gbk');
     return $sHtml;
 }
示例#3
0
 public function buildRequestForm(\Think\Pay\PayVo $vo)
 {
     $param = array('input_charset' => "UTF-8", 'body' => $vo->getBody(), 'subject' => $vo->getTitle(), 'return_url' => $this->config['return_url'], 'notify_url' => $this->config['notify_url'], 'partner' => $this->config['partner'], 'out_trade_no' => $vo->getOrderNo(), 'total_fee' => $vo->getFee() * 100, 'spbill_create_ip' => get_client_ip());
     $param['sign'] = $this->createSign($param);
     $sHtml = $this->_buildForm($param, $this->gateway);
     return $sHtml;
 }
示例#4
0
 public function buildRequestForm(\Think\Pay\PayVo $vo, $type = 'direct')
 {
     if ($type == 'direct') {
         $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());
     }
     if ($type == 'dualfun') {
         $param = array('service' => 'trade_create_by_buyer', '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(), 'price' => $vo->getFee(), 'quantity' => "1", 'logistics_fee' => "0.00", 'logistics_type' => "EXPRESS", 'logistics_payment' => "SELLER_PAY", 'show_url' => getPageURl(), 'receive_name' => "会员", 'receive_address' => "北京", 'receive_zip' => "100000", 'receive_phone' => "010-88888888", 'receive_mobile' => "13800138000");
     }
     ksort($param);
     reset($param);
     $arg = '';
     foreach ($param as $key => $value) {
         if ($value) {
             $arg .= "{$key}={$value}&";
         }
     }
     $param['sign'] = md5(substr($arg, 0, -1) . $this->config['key']);
     $param['sign_type'] = 'MD5';
     $sHtml = $this->_buildForm($param, $this->gateway, 'get');
     return $sHtml;
 }
示例#5
0
 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}&";
         }
     }
     $param['sign'] = md5(substr($arg, 0, -1) . $this->config['key']);
     $param['sign_type'] = 'MD5';
     $sHtml = $this->_buildForm($param, $this->gateway, 'get');
     return $sHtml;
 }