|
@@ -146,6 +146,46 @@ public class MyTest {
|
|
|
private String ysWithdrawNotifyUrl;
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 分账查询测试
|
|
|
+ */
|
|
|
+ @Test
|
|
|
+ void test22() {
|
|
|
+ OnlineReqDataVo req = new OnlineReqDataVo();
|
|
|
+
|
|
|
+ //请求路径,建议配置在项目的配置文件里面
|
|
|
+ String reqUrl = "https://commonapi.ysepay.com/gateway.do";
|
|
|
+
|
|
|
+ //银盛支付服务器主动通知商户网站里指定的页面http路径
|
|
|
+ String notifyUrl = "http://api.test.ysepay.net/atinterface/receive_return.htm";
|
|
|
+ req.setNotifyUrl(notifyUrl);
|
|
|
+
|
|
|
+ //商户在银盛支付平台开设的用户号[商户号],接入时需要替换成自己的
|
|
|
+ req.setPartnerId(partnerId);
|
|
|
+ req.setReqUrl(reqUrl);
|
|
|
+ req.setPrivateKeyFilePath(privateKeyPath);
|
|
|
+ req.setPrivateKeyPassword(privateKeyPass);
|
|
|
+ req.setYsPublicKeyFilePath(publicKeyPath);
|
|
|
+ //线上分账查询接口业务参数
|
|
|
+ Map<String, Object> bizContent = new HashMap<>();
|
|
|
+ bizContent.put("src_usercode", partnerId);//原交易发起方
|
|
|
+ bizContent.put("out_trade_no", "20230414176151484");//原订单号
|
|
|
+ bizContent.put("sys_flag", "DD");//可空。系统标志 DD:订单交易,DS:代收交易,默认是DD,订单交易
|
|
|
+ req.setParamData(bizContent);
|
|
|
+ String result = null;
|
|
|
+ try{
|
|
|
+ logger.info("线上分账查询调用sdk接口addScanMerc请求入参为:"+ JSONObject.toJSONString(req));
|
|
|
+ result = MercFundApi.divisionOnlineQuery(req);
|
|
|
+ System.out.println("result = " + result);
|
|
|
+ //根据返回结果处理自己的业务逻辑,result内容详见接口文档
|
|
|
+ }catch (Exception e){
|
|
|
+ logger.info("线上分账查询接口失败:"+ e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 分账测试
|
|
|
*/
|