基本信息
源码名称:福建海峡银行h5公众号支付,查询订单,退款PHP接口
源码大小:1.36M
文件格式:.zip
开发语言:PHP
更新时间:2019-12-10
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍

─福建海峡银行h5支付,查询,退款demo
    │  Hx_pay_demo.php
    │  海峡通商户开发指南1.0.5.doc
    │
    └─正式环境文档
            非POS商户秘钥上传下载步骤.pdf


    protected $user_id;
    protected $openid;
    protected $aeskey;
    protected $iv;
    protected $edKey;  //由aeskey和iv拼接而成
    protected $pub_bank;  //银行端公钥
    protected $pubKey;  //公钥
    protected $priKey;  //私钥
    protected $chnlId;  //渠道id
    protected $deviceNo;  //设备id
    protected $devideType;  //设备类型
    protected $spbillCreateIp; //第三方终端IP
    protected $merSerNum;  //版本
    protected $orgSerNum;  //版本序号
    protected $merNo;  //商户号
    protected $subAppId;  //公众号appid
    protected $pay_url; //h5付款
    protected $select_url; //查询订单
    protected $refund_url; //退款
    protected $pay_text;  //是否测试环境

    public function __construct(Request $request = null)
    {
        parent::__construct($request);
        $this->pay_text = 1;
        $pay_text = $this->pay_text;
        $this->openid = session('openid');

        //海峡参数
//        $this->aeskey=self::getRand(16); //生成16位数aes秘钥,测试环境第一次自己生成
//        $this->iv=self::getRand(16); //生成16位数iv,测试环境第一次自己生成
        //是否测试环境,测试环境取测试环境参数,正式环境取正式环境参数
        $this->aeskey =  $pay_text ?'填随机16位aeskey':substr(yyconfig('hx_edKey'),16,32);
        $this->iv = $pay_text ?'填随机16位iv':substr(yyconfig('hx_edKey'),0,16);
        $this->edKey = $pay_text ?$this->aeskey . $this->iv:yyconfig('hx_edKey'); //edKey字段
        $pubKey_n = yyconfig('hx_pubKey');
        $pubKey_n_zs = '填测试环境公钥';
        $pub_bank_n = yyconfig('hx_pub_bank');
        $pub_bank_n_zs = '填测试环境银行端公钥';
        $priKey_n = yyconfig('hx_priKey');
        $priKey_n_zs = '填测试环境私钥';
        $pubKey_n = $pay_text ? $pubKey_n_zs : $pubKey_n; //公钥
        $priKey_n = $pay_text ? $priKey_n_zs : $priKey_n; //私钥
        $pub_bank_n = $pay_text ? $pub_bank_n_zs : $pub_bank_n; //银行端公钥
        //公众号付款 测试环境: 'https://test.fjhxbank.com/hxPay/upaygate/wechatOfficalAccoOrderCrt.do'
        $this->pay_url = $pay_text ? 'https://test.fjhxbank.com/hxPay/upaygate/wechatOfficalAccoOrderCrt.do' :
            'https://obank.fjhxbank.com/hxPay/upaygate/wechatOfficalAccoOrderCrt.do';
        //订单查询  测试环境: 'https://test.fjhxbank.com/hxPay/upaygate/orderStatQry.do'
        $this->select_url = $pay_text ? 'https://test.fjhxbank.com/hxPay/upaygate/orderStatQry.do' :
            'https://obank.fjhxbank.com/hxPay/upaygate/orderStatQry.do';
        //退款  测试环境: 'https://test.fjhxbank.com/hxPay/upaygate/orderRefund.do'
        $this->refund_url = $pay_text ? 'https://test.fjhxbank.com/hxPay/upaygate/orderRefund.do' :
            'https://obank.fjhxbank.com/hxPay/upaygate/orderRefund.do';

        $this->pub_bank = self::formatPubKey($pub_bank_n); //格式化银行端公钥
        $this->pubKey = self::formatPubKey($pubKey_n); //格式化公钥
        $this->priKey = self::formatPriKey($priKey_n);  //格式化商户端私钥
        $this->chnlId = yyconfig('hx_chnlId');     //渠道id
        $this->deviceNo = yyconfig('hx_deviceNo'); //设备id
        $this->devideType = yyconfig('hx_devideType'); //设备类型
        $this->spbillCreateIp = yyconfig('hx_spbillCreateIp');
        $this->merSerNum = $pay_text ? '01' : yyconfig('hx_merSerNum');
        $this->orgSerNum = $pay_text ? '0001' : yyconfig('hx_orgSerNum');
        $this->merNo = $pay_text ? '填测试环境商户号' : yyconfig('hx_merNo');  //海峡商户号
        $this->subAppId = yyconfig('wx_appid');  //公众号appid

    }