Compare commits
3 Commits
f4e82e9952
...
pay
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa4469b494 | ||
| 3537cf4dbd | |||
| c7b13dcf6b |
@@ -60,8 +60,8 @@ public class EntryManagerTask {
|
|||||||
for (ShopDirectMerchant shopDirectMerchant : list) {
|
for (ShopDirectMerchant shopDirectMerchant : list) {
|
||||||
String wechatMerchantId = "";
|
String wechatMerchantId = "";
|
||||||
String alipayMerchantId = "";
|
String alipayMerchantId = "";
|
||||||
if (PayCst.EntryStatus.NEED_QUERY_LIST.contains(shopDirectMerchant.getWechatStatus())) {
|
if (PayCst.EntryStatus.NEED_QUERY_LIST.contains(shopDirectMerchant.getWechatStatus()) && StrUtil.isNotBlank(shopDirectMerchant.getWechatApplyId())) {
|
||||||
QueryStatusResp wechatStatus = EntryManager.queryWechatEntryStatus(shopDirectMerchant.getMerchantCode());
|
QueryStatusResp wechatStatus = EntryManager.queryWechatEntryStatus(shopDirectMerchant.getWechatApplyId());
|
||||||
shopDirectMerchant.setWechatStatus(wechatStatus.getStatus());
|
shopDirectMerchant.setWechatStatus(wechatStatus.getStatus());
|
||||||
shopDirectMerchant.setWechatErrorMsg(wechatStatus.getFailReason());
|
shopDirectMerchant.setWechatErrorMsg(wechatStatus.getFailReason());
|
||||||
shopDirectMerchant.setWechatSignUrl(wechatStatus.getSignUrl());
|
shopDirectMerchant.setWechatSignUrl(wechatStatus.getSignUrl());
|
||||||
@@ -69,8 +69,8 @@ public class EntryManagerTask {
|
|||||||
wechatMerchantId = wechatStatus.getThirdMerchantId();
|
wechatMerchantId = wechatStatus.getThirdMerchantId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (PayCst.EntryStatus.NEED_QUERY_LIST.contains(shopDirectMerchant.getAlipayStatus())) {
|
if (PayCst.EntryStatus.NEED_QUERY_LIST.contains(shopDirectMerchant.getAlipayStatus()) && StrUtil.isNotBlank(shopDirectMerchant.getAlipayOrderId())) {
|
||||||
QueryStatusResp alipayStatus = EntryManager.queryAlipayEntryStatus(shopDirectMerchant.getMerchantCode());
|
QueryStatusResp alipayStatus = EntryManager.queryAlipayEntryStatus(shopDirectMerchant.getAlipayOrderId());
|
||||||
shopDirectMerchant.setAlipayStatus(alipayStatus.getStatus());
|
shopDirectMerchant.setAlipayStatus(alipayStatus.getStatus());
|
||||||
shopDirectMerchant.setAlipayErrorMsg(alipayStatus.getFailReason());
|
shopDirectMerchant.setAlipayErrorMsg(alipayStatus.getFailReason());
|
||||||
shopDirectMerchant.setAlipaySignUrl(alipayStatus.getSignUrl());
|
shopDirectMerchant.setAlipaySignUrl(alipayStatus.getSignUrl());
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class EntryManager {
|
|||||||
/**
|
/**
|
||||||
* 查询微信进件状态
|
* 查询微信进件状态
|
||||||
*
|
*
|
||||||
* @param merchantCode 商户编号, 进件时返回的批次号 {@link com.czg.dto.resp.EntryRespDto#wechatApplyId}
|
* @param merchantCode 商户编号, 进件时返回的批次号 {@link EntryRespDto#wechatApplyId}
|
||||||
* @return 进件状态
|
* @return 进件状态
|
||||||
*/
|
*/
|
||||||
public static QueryStatusResp queryWechatEntryStatus(String merchantCode) {
|
public static QueryStatusResp queryWechatEntryStatus(String merchantCode) {
|
||||||
@@ -51,7 +51,7 @@ public class EntryManager {
|
|||||||
/**
|
/**
|
||||||
* 查询支付宝进件状态
|
* 查询支付宝进件状态
|
||||||
*
|
*
|
||||||
* @param batchNo 商户编号, 进件时返回的批次号 {@link com.czg.dto.resp.EntryRespDto#alipayOrderId}
|
* @param batchNo 商户编号, 进件时返回的批次号 {@link EntryRespDto#alipayOrderId}
|
||||||
* @return 进件状态
|
* @return 进件状态
|
||||||
*/
|
*/
|
||||||
public static QueryStatusResp queryAlipayEntryStatus(String batchNo) {
|
public static QueryStatusResp queryAlipayEntryStatus(String batchNo) {
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ package com.czg.third.alipay;
|
|||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.alipay.v3.ApiException;
|
import com.alipay.v3.ApiException;
|
||||||
import com.alipay.v3.api.AlipayOpenAgentApi;
|
import com.alipay.v3.api.*;
|
||||||
import com.alipay.v3.api.AlipayOpenAgentCommonsignApi;
|
|
||||||
import com.alipay.v3.api.AlipayOpenAgentFacetofaceApi;
|
|
||||||
import com.alipay.v3.api.AlipayOpenAgentOrderApi;
|
|
||||||
import com.alipay.v3.model.*;
|
import com.alipay.v3.model.*;
|
||||||
import com.czg.PayCst;
|
import com.czg.PayCst;
|
||||||
import com.czg.dto.req.*;
|
import com.czg.dto.req.*;
|
||||||
@@ -107,15 +104,13 @@ public class AlipayIsvEntryManager {
|
|||||||
try {
|
try {
|
||||||
String batchNo = createRequest(reqDto);
|
String batchNo = createRequest(reqDto);
|
||||||
|
|
||||||
// 构造请求参数以调用接口
|
AlipayOpenAgentFacetofaceSignModel signModel = buildFaceToFaceModel(reqDto, batchNo);
|
||||||
AlipayOpenAgentFacetofaceApi api = new AlipayOpenAgentFacetofaceApi();
|
|
||||||
|
|
||||||
AlipayOpenAgentFacetofaceSignModel signModel = buildSignModel(reqDto, batchNo);
|
|
||||||
|
|
||||||
File businessLicensePic = UploadFileUtil.getFileByUrl(reqDto.getBusinessLicenceInfo().getLicensePic().getUrl());
|
File businessLicensePic = UploadFileUtil.getFileByUrl(reqDto.getBusinessLicenceInfo().getLicensePic().getUrl());
|
||||||
File shopScenePic = UploadFileUtil.getFileByUrl(reqDto.getStoreInfo().getInsidePic().getUrl());
|
File shopScenePic = UploadFileUtil.getFileByUrl(reqDto.getStoreInfo().getInsidePic().getUrl());
|
||||||
File shopSignBoardPic = UploadFileUtil.getFileByUrl(reqDto.getStoreInfo().getDoorPic().getUrl());
|
File shopSignBoardPic = UploadFileUtil.getFileByUrl(reqDto.getStoreInfo().getDoorPic().getUrl());
|
||||||
|
|
||||||
|
// 构造请求参数以调用接口
|
||||||
|
AlipayOpenAgentFacetofaceApi api = new AlipayOpenAgentFacetofaceApi();
|
||||||
Object response = api.sign(null, businessLicensePic, signModel, shopScenePic, shopSignBoardPic, null);
|
Object response = api.sign(null, businessLicensePic, signModel, shopScenePic, shopSignBoardPic, null);
|
||||||
log.info("支付宝开启代商户签约: 响应={}", JSONObject.toJSONString(response));
|
log.info("支付宝开启代商户签约: 响应={}", JSONObject.toJSONString(response));
|
||||||
|
|
||||||
@@ -202,7 +197,10 @@ public class AlipayIsvEntryManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AlipayOpenAgentFacetofaceSignModel buildSignModel(AggregateMerchantDto reqDto, String batchNo) {
|
/**
|
||||||
|
* 构建 当面付参数
|
||||||
|
*/
|
||||||
|
public static AlipayOpenAgentFacetofaceSignModel buildFaceToFaceModel(AggregateMerchantDto reqDto, String batchNo) {
|
||||||
AlipayOpenAgentFacetofaceSignModel signModel = new AlipayOpenAgentFacetofaceSignModel();
|
AlipayOpenAgentFacetofaceSignModel signModel = new AlipayOpenAgentFacetofaceSignModel();
|
||||||
signModel.setBatchNo(batchNo);
|
signModel.setBatchNo(batchNo);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user