Example #1
0
 public static function getInstance()
 {
     if (self::$self == null) {
         self::$self = new Chinapnr();
     }
     return self::$self;
 }
Example #2
0
 public function __construct()
 {
     $tuoguan = FS("Webconfig/tuoguanconfig");
     import("ORG.Huifu.lib.Chinapnr");
     $params = array();
     $params['merId'] = $tuoguan['huifu']['merId'];
     //商户号
     $params['serverLocation'] = "http://mertest.chinapnr.com/muser/publicRequests";
     // 测试地址
     //$params['serverLocation'] = "https://lab.chinapnr.com/muser/publicRequests";// 正式地址
     $params['chinapnrPublicKey'] = $tuoguan['huifu']['chinapnrPublicKey'];
     //公钥
     $params['merchantPrivateKey'] = $tuoguan['huifu']['merchantPrivateKey'];
     //私钥
     $this->merCustId = $tuoguan['huifu']['MerCustId'];
     //商户客户号
     $this->chinapnr = Chinapnr::getInstance($params);
 }