精品人妻一区二区三区免费-都市老熟女爱鸡巴的视频-国产精品白浆一区二区视频-中文字幕一区二区三区绿巨人

400-800-9385
網(wǎng)站建設(shè)資訊詳細

香港流行的商城支付接口傳款易payDollor介紹

發(fā)表日期:2013-05-14 00:00:00   作者來源:方維網(wǎng)絡(luò)   瀏覽:10674   標簽:payDollor    支付接口    在線支付    
    paydollor
    傳款易payDollor是聯(lián)款通(香港)有限公司所有的一種強大的在線支付服務(wù)平臺,其提供安全、多渠道、多語言和多種貨幣的支付服務(wù)。

    一般國內(nèi)比較流行采用網(wǎng)銀、支付寶、財付通等支付接口,國外則比較多用paypal和銀聯(lián)、信用卡支付,香港則比較多人用payDollor。所以在國內(nèi)搜索引擎搜索paydollor支付接口相關(guān)文檔是很難找到有用的信息,而官方網(wǎng)站只提供給商家用戶比較多的技術(shù)資料。

    如果網(wǎng)站要實現(xiàn)payDollor在線支付接口,需要客戶提供商戶ID和哈希密鑰,因為只有這兩個才能實現(xiàn)。哈希密鑰只要是在網(wǎng)站和支付平臺傳遞參數(shù)時對相關(guān)參數(shù)進行哈希加密,防止相關(guān)信息被人篡改。

   以下是方維網(wǎng)絡(luò)實現(xiàn)在線接口相關(guān)PHP代碼。希望對大家有幫助。

class pay_paydollor
{
public $parameter;
public $secureHashSelect;
public $merchantId;
public $action_url;
function __construct()
{
global $CONFIG;
include "../../cache/config_paydollor.inc.php";
$this->secureHashSelect=$paydollor_key;//哈希密鑰
$this->merchantId=$paydollor_mid;//商戶號
$this->action_url = "https://www.paydollar.com/b2c2/eng/payment/payForm.jsp";    
//$this->action_url  = "https://test.paydollar.com/b2cDemo/eng/payment/payForm.jsp";
$this->parameter = array(
'merchantId' => $this->merchantId, 
'currCode' => '344',
//'mpsMode' => 'NIL',           
'successUrl' => “支付成功返回地址",        
'failUrl' => ”支付失敗返回地址",       
'cancelUrl' => “取消支付返回地址",        
'payType' => 'N',           
'lang' => 'C',           
'payMethod' => 'ALL',
'mpsMode' => 'NIL'
 
);
}
function get_code($order) {         
$s='';
$parameter=$this->parameter;   
$parameter['amount'] = $order['pay_total'];//需要支付的金額
$parameter['orderRef']= $order['orderno'];//訂單號碼
 
foreach($parameter as $k => $v)
{           
$s.="<input type='hidden' name='$k' value='$v'/>";       
}        
$str=$parameter['merchantId'].'|'.$parameter['orderRef'].'|'.$parameter['currCode'].'|'.$parameter['amount'].'|'.$parameter['payType'].'|'.$this->secureHashSelect;
$secureHash=sha1($str);
$s.="<input type='hidden' name='secureHash' value='".$secureHash."' />"; 
$button = "<div style='text-align:center'><form name='paydollorsubmit' id='paydollorsubmit' action='$this->action_url' method='post'>$s<input type='submit'  value='現(xiàn)在支付' style='display:none' ><form><script>document.forms['paydollorsubmit'].submit();</script></div>";
return $button;   
}
}

這個是網(wǎng)站向支付平臺發(fā)送的支付申請,回調(diào)更新訂單狀態(tài)的原理差不多,這里就不再一一贅述。
如果需要了解更多,可咨詢本網(wǎng)站客服。
如沒特殊注明,文章均為方維網(wǎng)絡(luò)原創(chuàng),轉(zhuǎn)載請注明來自http://zsyzsj.com/news/1856.html
相關(guān)網(wǎng)站設(shè)計案例