新增toPay方法,以便于简化跳转支付;对支付对接地址抽象出接口方法

This commit is contained in:
egan
2019-04-15 23:52:20 +08:00
parent 0ebb5e48f6
commit c5ce9edf1f
12 changed files with 124 additions and 100 deletions

View File

@@ -65,9 +65,17 @@ public class AliPayService extends BasePayService<AliPayConfigStorage> {
*
* @return 请求地址
*/
public String getReqUrl() {
public String getReqUrl(TransactionType transactionType) {
return payConfigStorage.isTest() ? DEV_REQ_URL : HTTPS_REQ_URL;
}
/**
* 获取对应的请求地址
*
* @return 请求地址
*/
public String getReqUrl() {
return getReqUrl(null);
}
public AliPayService(AliPayConfigStorage payConfigStorage, HttpConfigStorage configStorage) {
@@ -79,10 +87,6 @@ public class AliPayService extends BasePayService<AliPayConfigStorage> {
}
public String getHttpsVerifyUrl() {
return getReqUrl() + "?service=notify_verify";
}
/**
* 回调校验
*