mirror of
https://github.com/Javen205/IJPay.git
synced 2026-05-07 05:45:58 +08:00
⚡ 避免类重名
This commit is contained in:
@@ -84,4 +84,9 @@ public interface IJPayConstants {
|
||||
* 服务不可用,过载保护
|
||||
*/
|
||||
int CODE_503 = 503;
|
||||
|
||||
/**
|
||||
* 在线交流
|
||||
*/
|
||||
String ONLINE_CONTACT = "IJPay 让支付触手可及,交流群 723992875、864988890";
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ijpay.core.IJPayHttpResponse;
|
||||
import com.ijpay.core.enums.RequestMethod;
|
||||
import com.ijpay.core.enums.RequestMethodEnum;
|
||||
import com.ijpay.core.kit.AesUtil;
|
||||
import com.ijpay.core.kit.HttpKit;
|
||||
import com.ijpay.core.kit.PayKit;
|
||||
@@ -169,7 +169,7 @@ public class WxPayV3Controller extends Controller {
|
||||
// 获取平台证书列表
|
||||
try {
|
||||
IJPayHttpResponse response = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
OtherApiEnum.GET_CERTIFICATES.toString(),
|
||||
mchId,
|
||||
@@ -228,7 +228,7 @@ public class WxPayV3Controller extends Controller {
|
||||
|
||||
log.info("统一下单参数 " + JSONUtil.toJsonStr(unifiedOrderModel));
|
||||
IJPayHttpResponse response = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.NATIVE_PAY.toString(),
|
||||
mchId,
|
||||
@@ -264,7 +264,7 @@ public class WxPayV3Controller extends Controller {
|
||||
|
||||
log.info("统一下单参数 " + JSONUtil.toJsonStr(unifiedOrderModel));
|
||||
IJPayHttpResponse response = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.JS_API_PAY.toString(),
|
||||
mchId,
|
||||
@@ -300,7 +300,7 @@ public class WxPayV3Controller extends Controller {
|
||||
params.put("url", "https://gitee.com/javen205/IJPay");
|
||||
|
||||
IJPayHttpResponse response = WxPayApi.v3(
|
||||
RequestMethod.PUT,
|
||||
RequestMethodEnum.PUT,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
ComplaintsApiEnum.COMPLAINTS_NOTIFICATION.toString(),
|
||||
mchId,
|
||||
@@ -328,7 +328,7 @@ public class WxPayV3Controller extends Controller {
|
||||
params.put("out_order_no", "1234323JKHDFE1243252");
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
PayScoreApiEnum.PAY_SCORE_SERVICE_ORDER.toString(),
|
||||
mchId,
|
||||
@@ -350,7 +350,7 @@ public class WxPayV3Controller extends Controller {
|
||||
HashMap<String, String> hashMap = new HashMap<>(12);
|
||||
hashMap.put("url", "https://qq.com");
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
ComplaintsApiEnum.COMPLAINTS_NOTIFICATION.toString(),
|
||||
mchId,
|
||||
@@ -362,7 +362,7 @@ public class WxPayV3Controller extends Controller {
|
||||
System.out.println(result);
|
||||
|
||||
result = WxPayApi.v3(
|
||||
RequestMethod.DELETE,
|
||||
RequestMethodEnum.DELETE,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
ComplaintsApiEnum.COMPLAINTS_NOTIFICATION.toString(),
|
||||
mchId,
|
||||
@@ -423,7 +423,7 @@ public class WxPayV3Controller extends Controller {
|
||||
String urlSuffix = String.format(PayGiftActivityApiEnum.PAY_GIFT_ACTIVITY_TERMINATE.toString(), "10028001");
|
||||
System.out.println(urlSuffix);
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
urlSuffix,
|
||||
mchId,
|
||||
@@ -445,7 +445,7 @@ public class WxPayV3Controller extends Controller {
|
||||
String body = "处理请求参数";
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
Apply4SubApiEnum.APPLY_4_SUB.toString(),
|
||||
mchId,
|
||||
@@ -496,7 +496,7 @@ public class WxPayV3Controller extends Controller {
|
||||
params.put("tar_type", "GZIP");
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.TRADE_BILL.toString(),
|
||||
mchId,
|
||||
@@ -533,7 +533,7 @@ public class WxPayV3Controller extends Controller {
|
||||
params.put("account_type", "BASIC");
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.FUND_FLOW_BILL.toString(),
|
||||
mchId,
|
||||
@@ -564,7 +564,7 @@ public class WxPayV3Controller extends Controller {
|
||||
}
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.BILL_DOWNLOAD.toString(),
|
||||
mchId,
|
||||
|
||||
@@ -11,7 +11,7 @@ import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.ijpay.core.IJPayHttpResponse;
|
||||
import com.ijpay.core.enums.RequestMethod;
|
||||
import com.ijpay.core.enums.RequestMethodEnum;
|
||||
import com.ijpay.core.kit.AesUtil;
|
||||
import com.ijpay.core.kit.HttpKit;
|
||||
import com.ijpay.core.kit.PayKit;
|
||||
@@ -198,7 +198,7 @@ public class WxPayV3Controller {
|
||||
// 获取平台证书列表
|
||||
try {
|
||||
IJPayHttpResponse response = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
OtherApiEnum.GET_CERTIFICATES.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -260,7 +260,7 @@ public class WxPayV3Controller {
|
||||
|
||||
log.info("统一下单参数 {}", JSONUtil.toJsonStr(unifiedOrderModel));
|
||||
IJPayHttpResponse response = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.NATIVE_PAY.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -298,7 +298,7 @@ public class WxPayV3Controller {
|
||||
|
||||
log.info("统一下单参数 {}", JSONUtil.toJsonStr(unifiedOrderModel));
|
||||
IJPayHttpResponse response = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.JS_API_PAY.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -338,7 +338,7 @@ public class WxPayV3Controller {
|
||||
params.put("url", "https://gitee.com/javen205/IJPay");
|
||||
|
||||
IJPayHttpResponse response = WxPayApi.v3(
|
||||
RequestMethod.PUT,
|
||||
RequestMethodEnum.PUT,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
ComplaintsApiEnum.COMPLAINTS_NOTIFICATION.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -369,7 +369,7 @@ public class WxPayV3Controller {
|
||||
params.put("out_order_no", "1234323JKHDFE1243252");
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
PayScoreApiEnum.PAY_SCORE_SERVICE_ORDER.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -394,7 +394,7 @@ public class WxPayV3Controller {
|
||||
HashMap<String, String> hashMap = new HashMap<>(12);
|
||||
hashMap.put("url", "https://qq.com");
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
ComplaintsApiEnum.COMPLAINTS_NOTIFICATION.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -406,7 +406,7 @@ public class WxPayV3Controller {
|
||||
System.out.println(result);
|
||||
|
||||
result = WxPayApi.v3(
|
||||
RequestMethod.DELETE,
|
||||
RequestMethodEnum.DELETE,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
ComplaintsApiEnum.COMPLAINTS_NOTIFICATION.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -473,7 +473,7 @@ public class WxPayV3Controller {
|
||||
String urlSuffix = String.format(PayGiftActivityApiEnum.PAY_GIFT_ACTIVITY_TERMINATE.toString(), "10028001");
|
||||
System.out.println(urlSuffix);
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
urlSuffix,
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -498,7 +498,7 @@ public class WxPayV3Controller {
|
||||
String body = "处理请求参数";
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
Apply4SubApiEnum.APPLY_4_SUB.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -557,7 +557,7 @@ public class WxPayV3Controller {
|
||||
params.put("tar_type", "GZIP");
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.TRADE_BILL.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -598,7 +598,7 @@ public class WxPayV3Controller {
|
||||
params.put("account_type", "BASIC");
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.FUND_FLOW_BILL.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -631,7 +631,7 @@ public class WxPayV3Controller {
|
||||
}
|
||||
|
||||
IJPayHttpResponse result = WxPayApi.v3(
|
||||
RequestMethod.GET,
|
||||
RequestMethodEnum.GET,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.BILL_DOWNLOAD.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
@@ -680,7 +680,7 @@ public class WxPayV3Controller {
|
||||
}
|
||||
log.info("退款参数 {}", JSONUtil.toJsonStr(refundModel));
|
||||
IJPayHttpResponse response = WxPayApi.v3(
|
||||
RequestMethod.POST,
|
||||
RequestMethodEnum.POST,
|
||||
WxDomainEnum.CHINA.toString(),
|
||||
BasePayApiEnum.REFUND.toString(),
|
||||
wxPayV3Bean.getMchId(),
|
||||
|
||||
@@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.ContentType;
|
||||
import com.ijpay.core.IJPayHttpResponse;
|
||||
import com.ijpay.core.enums.PayModel;
|
||||
import com.ijpay.core.enums.RequestMethod;
|
||||
import com.ijpay.core.enums.RequestMethodEnum;
|
||||
import com.ijpay.core.enums.SignType;
|
||||
import com.ijpay.core.kit.HttpKit;
|
||||
import com.ijpay.core.kit.PayKit;
|
||||
@@ -239,7 +239,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -254,10 +254,10 @@ public class WxPayApi {
|
||||
* @return {@link IJPayHttpResponse} 请求返回的结果
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
public static IJPayHttpResponse v3(RequestMethod method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, String keyPath,
|
||||
String body, String nonceStr, long timestamp, String authType,
|
||||
File file) throws Exception {
|
||||
public static IJPayHttpResponse v3(RequestMethodEnum method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, String keyPath,
|
||||
String body, String nonceStr, long timestamp, String authType,
|
||||
File file) throws Exception {
|
||||
// 构建 Authorization
|
||||
String authorization = WxPayKit.buildAuthorization(method, urlSuffix, mchId, serialNo,
|
||||
keyPath, body, nonceStr, timestamp, authType);
|
||||
@@ -266,15 +266,15 @@ public class WxPayApi {
|
||||
platSerialNo = serialNo;
|
||||
}
|
||||
|
||||
if (method == RequestMethod.GET) {
|
||||
if (method == RequestMethodEnum.GET) {
|
||||
return get(urlPrefix.concat(urlSuffix), authorization, platSerialNo, null);
|
||||
} else if (method == RequestMethod.POST) {
|
||||
} else if (method == RequestMethodEnum.POST) {
|
||||
return post(urlPrefix.concat(urlSuffix), authorization, platSerialNo, body);
|
||||
} else if (method == RequestMethod.DELETE) {
|
||||
} else if (method == RequestMethodEnum.DELETE) {
|
||||
return delete(urlPrefix.concat(urlSuffix), authorization, platSerialNo, body);
|
||||
} else if (method == RequestMethod.UPLOAD) {
|
||||
} else if (method == RequestMethodEnum.UPLOAD) {
|
||||
return upload(urlPrefix.concat(urlSuffix), authorization, platSerialNo, body, file);
|
||||
} else if (method == RequestMethod.PUT) {
|
||||
} else if (method == RequestMethodEnum.PUT) {
|
||||
return put(urlPrefix.concat(urlSuffix), authorization, platSerialNo, body);
|
||||
}
|
||||
return null;
|
||||
@@ -283,7 +283,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -298,10 +298,10 @@ public class WxPayApi {
|
||||
* @return {@link IJPayHttpResponse} 请求返回的结果
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
public static IJPayHttpResponse v3(RequestMethod method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, PrivateKey privateKey,
|
||||
String body, String nonceStr, long timestamp, String authType,
|
||||
File file) throws Exception {
|
||||
public static IJPayHttpResponse v3(RequestMethodEnum method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, PrivateKey privateKey,
|
||||
String body, String nonceStr, long timestamp, String authType,
|
||||
File file) throws Exception {
|
||||
// 构建 Authorization
|
||||
String authorization = WxPayKit.buildAuthorization(method, urlSuffix, mchId, serialNo,
|
||||
privateKey, body, nonceStr, timestamp, authType);
|
||||
@@ -310,15 +310,15 @@ public class WxPayApi {
|
||||
platSerialNo = serialNo;
|
||||
}
|
||||
|
||||
if (method == RequestMethod.GET) {
|
||||
if (method == RequestMethodEnum.GET) {
|
||||
return get(urlPrefix.concat(urlSuffix), authorization, platSerialNo, null);
|
||||
} else if (method == RequestMethod.POST) {
|
||||
} else if (method == RequestMethodEnum.POST) {
|
||||
return post(urlPrefix.concat(urlSuffix), authorization, platSerialNo, body);
|
||||
} else if (method == RequestMethod.DELETE) {
|
||||
} else if (method == RequestMethodEnum.DELETE) {
|
||||
return delete(urlPrefix.concat(urlSuffix), authorization, platSerialNo, body);
|
||||
} else if (method == RequestMethod.UPLOAD) {
|
||||
} else if (method == RequestMethodEnum.UPLOAD) {
|
||||
return upload(urlPrefix.concat(urlSuffix), authorization, platSerialNo, body, file);
|
||||
} else if (method == RequestMethod.PUT) {
|
||||
} else if (method == RequestMethodEnum.PUT) {
|
||||
return put(urlPrefix.concat(urlSuffix), authorization, platSerialNo, body);
|
||||
}
|
||||
return null;
|
||||
@@ -327,7 +327,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -338,8 +338,8 @@ public class WxPayApi {
|
||||
* @return {@link IJPayHttpResponse} 请求返回的结果
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
public static IJPayHttpResponse v3(RequestMethod method, String urlPrefix, String urlSuffix, String mchId,
|
||||
String serialNo, String platSerialNo, String keyPath, String body) throws Exception {
|
||||
public static IJPayHttpResponse v3(RequestMethodEnum method, String urlPrefix, String urlSuffix, String mchId,
|
||||
String serialNo, String platSerialNo, String keyPath, String body) throws Exception {
|
||||
long timestamp = System.currentTimeMillis() / 1000;
|
||||
String authType = "WECHATPAY2-SHA256-RSA2048";
|
||||
String nonceStr = WxPayKit.generateStr();
|
||||
@@ -349,7 +349,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -360,8 +360,8 @@ public class WxPayApi {
|
||||
* @return {@link IJPayHttpResponse} 请求返回的结果
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
public static IJPayHttpResponse v3(RequestMethod method, String urlPrefix, String urlSuffix, String mchId,
|
||||
String serialNo, String platSerialNo, PrivateKey privateKey, String body) throws Exception {
|
||||
public static IJPayHttpResponse v3(RequestMethodEnum method, String urlPrefix, String urlSuffix, String mchId,
|
||||
String serialNo, String platSerialNo, PrivateKey privateKey, String body) throws Exception {
|
||||
long timestamp = System.currentTimeMillis() / 1000;
|
||||
String authType = "WECHATPAY2-SHA256-RSA2048";
|
||||
String nonceStr = WxPayKit.generateStr();
|
||||
@@ -371,7 +371,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -382,9 +382,9 @@ public class WxPayApi {
|
||||
* @return {@link IJPayHttpResponse} 请求返回的结果
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
public static IJPayHttpResponse v3(RequestMethod method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, String keyPath,
|
||||
Map<String, String> params) throws Exception {
|
||||
public static IJPayHttpResponse v3(RequestMethodEnum method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, String keyPath,
|
||||
Map<String, String> params) throws Exception {
|
||||
long timestamp = System.currentTimeMillis() / 1000;
|
||||
String authType = "WECHATPAY2-SHA256-RSA2048";
|
||||
String nonceStr = WxPayKit.generateStr();
|
||||
@@ -397,7 +397,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -408,9 +408,9 @@ public class WxPayApi {
|
||||
* @return {@link IJPayHttpResponse} 请求返回的结果
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
public static IJPayHttpResponse v3(RequestMethod method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, PrivateKey privateKey,
|
||||
Map<String, String> params) throws Exception {
|
||||
public static IJPayHttpResponse v3(RequestMethodEnum method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, PrivateKey privateKey,
|
||||
Map<String, String> params) throws Exception {
|
||||
long timestamp = System.currentTimeMillis() / 1000;
|
||||
String authType = "WECHATPAY2-SHA256-RSA2048";
|
||||
String nonceStr = WxPayKit.generateStr();
|
||||
@@ -438,7 +438,7 @@ public class WxPayApi {
|
||||
long timestamp = System.currentTimeMillis() / 1000;
|
||||
String authType = "WECHATPAY2-SHA256-RSA2048";
|
||||
String nonceStr = WxPayKit.generateStr();
|
||||
return v3(RequestMethod.UPLOAD, urlPrefix, urlSuffix, mchId, serialNo, platSerialNo, keyPath, body, nonceStr, timestamp, authType, file);
|
||||
return v3(RequestMethodEnum.UPLOAD, urlPrefix, urlSuffix, mchId, serialNo, platSerialNo, keyPath, body, nonceStr, timestamp, authType, file);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -460,13 +460,13 @@ public class WxPayApi {
|
||||
long timestamp = System.currentTimeMillis() / 1000;
|
||||
String authType = "WECHATPAY2-SHA256-RSA2048";
|
||||
String nonceStr = WxPayKit.generateStr();
|
||||
return v3(RequestMethod.UPLOAD, urlPrefix, urlSuffix, mchId, serialNo, platSerialNo, privateKey, body, nonceStr, timestamp, authType, file);
|
||||
return v3(RequestMethodEnum.UPLOAD, urlPrefix, urlSuffix, mchId, serialNo, platSerialNo, privateKey, body, nonceStr, timestamp, authType, file);
|
||||
}
|
||||
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -482,10 +482,10 @@ public class WxPayApi {
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
@Deprecated
|
||||
public static Map<String, Object> v3Execution(RequestMethod method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, String keyPath,
|
||||
String body, String nonceStr, long timestamp, String authType,
|
||||
File file) throws Exception {
|
||||
public static Map<String, Object> v3Execution(RequestMethodEnum method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, String keyPath,
|
||||
String body, String nonceStr, long timestamp, String authType,
|
||||
File file) throws Exception {
|
||||
IJPayHttpResponse response = v3(method, urlPrefix, urlSuffix, mchId, serialNo, platSerialNo, keyPath, body, nonceStr, timestamp, authType, file);
|
||||
return buildResMap(response);
|
||||
}
|
||||
@@ -493,7 +493,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -504,8 +504,8 @@ public class WxPayApi {
|
||||
* @throws Exception 异常信息
|
||||
*/
|
||||
@Deprecated
|
||||
public static Map<String, Object> v3Execution(RequestMethod method, String urlPrefix, String urlSuffix, String mchId,
|
||||
String serialNo, String keyPath, String body) throws Exception {
|
||||
public static Map<String, Object> v3Execution(RequestMethodEnum method, String urlPrefix, String urlSuffix, String mchId,
|
||||
String serialNo, String keyPath, String body) throws Exception {
|
||||
IJPayHttpResponse response = v3(method, urlPrefix, urlSuffix, mchId, serialNo, null, keyPath, body);
|
||||
return buildResMap(response);
|
||||
}
|
||||
@@ -513,7 +513,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -525,8 +525,8 @@ public class WxPayApi {
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
@Deprecated
|
||||
public static Map<String, Object> v3Execution(RequestMethod method, String urlPrefix, String urlSuffix, String mchId,
|
||||
String serialNo, String platSerialNo, String keyPath, String body) throws Exception {
|
||||
public static Map<String, Object> v3Execution(RequestMethodEnum method, String urlPrefix, String urlSuffix, String mchId,
|
||||
String serialNo, String platSerialNo, String keyPath, String body) throws Exception {
|
||||
IJPayHttpResponse response = v3(method, urlPrefix, urlSuffix, mchId, serialNo, platSerialNo, keyPath, body);
|
||||
return buildResMap(response);
|
||||
}
|
||||
@@ -534,7 +534,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -546,9 +546,9 @@ public class WxPayApi {
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
@Deprecated
|
||||
public static Map<String, Object> v3Execution(RequestMethod method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, String keyPath,
|
||||
Map<String, String> params) throws Exception {
|
||||
public static Map<String, Object> v3Execution(RequestMethodEnum method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String platSerialNo, String keyPath,
|
||||
Map<String, String> params) throws Exception {
|
||||
IJPayHttpResponse response = v3(method, urlPrefix, urlSuffix, mchId, serialNo, platSerialNo, keyPath, params);
|
||||
return buildResMap(response);
|
||||
}
|
||||
@@ -556,7 +556,7 @@ public class WxPayApi {
|
||||
/**
|
||||
* V3 接口统一执行入口
|
||||
*
|
||||
* @param method {@link RequestMethod} 请求方法
|
||||
* @param method {@link RequestMethodEnum} 请求方法
|
||||
* @param urlPrefix 可通过 {@link WxDomain}来获取
|
||||
* @param urlSuffix 可通过 {@link WxApiEnum} 来获取,URL挂载参数需要自行拼接
|
||||
* @param mchId 商户Id
|
||||
@@ -567,9 +567,9 @@ public class WxPayApi {
|
||||
* @throws Exception 接口执行异常
|
||||
*/
|
||||
@Deprecated
|
||||
public static Map<String, Object> v3Execution(RequestMethod method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String keyPath,
|
||||
Map<String, String> params) throws Exception {
|
||||
public static Map<String, Object> v3Execution(RequestMethodEnum method, String urlPrefix, String urlSuffix,
|
||||
String mchId, String serialNo, String keyPath,
|
||||
Map<String, String> params) throws Exception {
|
||||
IJPayHttpResponse response = v3(method, urlPrefix, urlSuffix, mchId, serialNo, null, keyPath, params);
|
||||
return buildResMap(response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user