예제 #1
0
 public function getUrl(PwPayVo $vo)
 {
     $param = array('payment_type' => '1', '_input_charset' => $this->charset, 'seller_email' => $this->alipay, 'notify_url' => $this->baseurl, 'return_url' => $this->baseurl, 'out_trade_no' => $vo->getOrderNo(), 'subject' => $vo->getTitle(), 'body' => $vo->getBody(), 'extend_param' => 'isv^pw11');
     if (!$this->alipay_interface) {
         $param["service"] = 'trade_create_by_buyer';
         $param["price"] = $vo->getFee();
         $param["quantity"] = '1';
         $param["logistics_fee"] = '0.00';
         $param["logistics_type"] = 'EXPRESS';
         $param["logistics_payment"] = 'SELLER_PAY';
     } else {
         $param['service'] = 'create_direct_pay_by_user';
         $param['total_fee'] = $vo->getFee();
     }
     return $this->_bulidUrl($this->alipay_url, $this->alipay_partnerID, $this->alipay_key, $param);
 }
예제 #2
0
 public function getUrl(PwPayVo $vo)
 {
     strlen($this->bill) == 11 && ($this->bill .= '01');
     $param = array('inputCharset' => $this->charset == 'gbk' ? 2 : 1, 'pageUrl' => $this->baseurl, 'version' => 'v2.0', 'language' => 1, 'signType' => 1, 'merchantAcctId' => $this->bill, 'payerName' => 'admin', 'orderId' => $vo->getOrderNo(), 'orderAmount' => $vo->getFee() * 100, 'orderTime' => Pw::time2str(Pw::getTime(), 'YmdHis'), 'productName' => $vo->getBody(), 'productNum' => 1, 'payType' => '00', 'redoFlag' => 1);
     $url = $this->bill_url;
     $arg = '';
     foreach ($param as $key => $value) {
         $value = trim($value);
         if (strlen($value) > 0) {
             $arg .= "{$key}={$value}&";
             $url .= "{$key}=" . urlencode($value) . "&";
             //$inputMsg .= "<input type=\"hidden\" name=\"$key\" value=\"$value\" />";
         }
     }
     $url .= 'signMsg=' . strtoupper(md5($arg . 'key=' . $this->bill_key));
     return $url;
 }