传款易paydollor是联款通(香港)有限公司所有的一种强大的在线支付服务平台,其提供安全、多渠道、多语言和多种货币的支付服务。
一般国内比较流行采用网银、支付宝、财付通等支付接口,国外则比较多用paypal和银联、信用卡支付,香港则比较多人用paydollor。所以在国内搜索引擎搜索paydollor支付接口相关文档是很难找到有用的信息,而官方网站只提供给商家用户比较多的技术资料。
如果网站要实现paydollor在线支付接口,需要客户提供商户id和哈希密钥,因为只有这两个才能实现。哈希密钥只要是在网站和支付平台传递参数时对相关参数进行哈希加密,防止相关信息被人篡改。
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='现在支付' style='display:none' ><form><script>document.forms['paydollorsubmit'].submit();</script></div>";
return $button;
}
}
这个是网站向支付平台发送的支付申请,回调更新订单状态的原理差不多,这里就不再一一赘述。
网站排名不稳定的原因分析企业做营销型网站开发有哪些好处怎么做深圳网站设计才能增加流量?香港免备案主机为什么一直受到热捧建设一个网站需要多少钱?对不起,我不知道手机网站建设需要注意的三点要求网站建设包含哪些方面的重要内容呢如何确保网站建设的安全性?