支付宝商户池,汇潮商户池和联动优势商户池如何申请及对接?

百度一下汇友支付获取商户池有限名额!

支付宝商户池,汇潮商户池和联动优势商户池对接流程
String valueObj = "{
       "version": "10",
       "cmd_id": "123123",
       "mer_cust_id": "123123123123",//入驻商户id
       "user_cust_id": "321321321321321",//入驻商户下级商户ID
       "order_id": "1234567",//订单编号
       "order_date": "20180327",
       "trans_amt": "6.95",
       "bind_card_id": "1000000085",//商户已绑定绑定卡号
       "sms_code": "111111",//短信验证码
       "div_detail": "[{'divCustId':'123123123123','divAcctId':'45841','divAmt':'6.92','divFreezeFg':'01'},{'divCustId':'321321321321','divAcctId':'12345','divAmt':'0.03','divFreezeFg':'00'}]",//分账串信息
       "bg_ret_url": "http://192.168.100.110:8001/npayCallBack/asyncHandle.json",//地址可以询问对方运营
       "ret_url": "",
       "mer_priv": "test",
       "extension": "test"
       }";
 String testUrl = "http://192.168.100.110:8083/npay/merchantRequest";//地址可以询问对方运营
// 加签用pfx文件
String pfxFileName = "888888-汇付测试商户.pfx";
// 加签用密码
String pfxFilePwd = "888888";
// 进行base64转换
String base64RequestParams = Base64.encodeBase64String(valueObj.getBytes(Charset.forName("utf-8")));
// 加签
SignResult signResult  = CFCASignature.signature("/app/etc/product/" + pfxFileName, pfxFilePwd,base64RequestParams, "utf-8");
String checkValue = signResult.getSign();
String cmdId = "123";//交易指令ID
String merCustId = "123123123123";//入驻商户id
String version = "10";
String contentType = "application/x-www-form-urlencoded";
String charset = "UTF-8";
String postStr = "cmd_id=" + cmdId + "&version=" + version + "&mer_cust_id=" + merCustId + "&check_value=" + checkValue;
 jodd.http.HttpRequest httpRequest = jodd.http.HttpRequest.post(testUrl).charset(charset);
 jodd.http.HttpResponse httpResponse = httpRequest.contentType(contentType).body(postStr).send();
 String body = httpResponse.bodyText();
//响应解密
JSONObject jsonObject = JSON.parseObject(body);
String sign = jsonObject.getString("check_value");
String cerName = "CFCA_ACS_OCA31.cer";//文件可以询问对方运营
VerifyResult verifyResult = CFCASignature.verifyMerSign("100001", sign, "utf-8", "/app/etc/product/" + cerName);
String content = new String(verifyResult.getContent(), Charset.forName("utf-8"));
String decrptyContent = new String(Base64.decodeBase64(content), Charset.forName("utf-8"));

猜你喜欢

转载自blog.csdn.net/qq_35218009/article/details/128325086