快捷支付码页面
服务 ID | zjrcuoip.platform.account.paycodepage |
---|
VERSION | 1.0.0 |
服务详细描述
三方上传 openId 和访问令牌通过快捷链接直接进入支付码页面。
示例代码
PlatPayCodePageDemoOp.java
@Service
public class PlatPayCodePageDemoOp {
@SuppressWarnings({ "rawtypes", "unchecked" })
public static void execute() {
INetTools netTools = NetToolsHttpFactory.getHttpInstance();
OipReqBean oipReqBean = new OipReqBean();
oipReqBean.setAppId("应用id");
oipReqBean.setDlpId("开发者id");
oipReqBean.setProdId("产品id");
oipReqBean.setMethod("zjrcuoip.platform.account.paycodepage");
oipReqBean.setVersion("1.0.0");
SimpleDateFormat sfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
oipReqBean.setTimestamp(sfs.format(new Date()));
NetReqConfBean netReqConfBean = new NetReqConfBean();
netReqConfBean.setAppPrivateKey("应用私钥");
netReqConfBean.setNetUrl("请求地址");
netReqConfBean.setPublicKey("开发者公钥");
Date d=new Date();
SimpleDateFormat sf=new SimpleDateFormat("yyyyMMddHHmmss");
Map map =new HashMap();
map.put("openId", "11111111111");
map.put("accessToken", "111111111");
String bizContent = JSON.toJSONString(map);
oipReqBean.setBizContent(bizContent);
OipRspBean oipRspBean = netTools.execute(oipReqBean, netReqConfBean);
if (oipRspBean.isSuccess()) {
String bizJson = oipRspBean.getBizContent();
if (StringUtils.isNotBlank(bizJson)) {
Map bizData = JSON.parseObject(bizJson, Map.class);
System.out.println(bizData);
}
}
}
}
公共报文
[点击查看公共报文]
业务输入项
序号 | key | 数据项名称 | 类型 | 长度 | 是否必输 | 数据项说明 |
---|
1 | openId | openId | String | 32 | 是 | |
2 | accessToken | 访问令牌 | String | 32 | 是 | |
业务输出项
序号 | key | 数据项名称 | 类型 | 长度 | 是否非空 | 数据项说明 |
---|
1 | redirectUrl | 支付码页面 URL | String | 2048 | 是 | |
响应码