转账 - 支付宝转账修改, 支付宝 Client 支持公钥证书模式

This commit is contained in:
jason
2023-10-20 23:20:47 +08:00
parent 00e18a480f
commit 183206e2d3
12 changed files with 118 additions and 163 deletions

View File

@ -66,7 +66,7 @@ public class PayDemoTransferServiceImpl implements PayDemoTransferService {
// TODO @jason可以参考 AppBrokerageWithdrawCreateReqVO 搞下字段哈,进行校验
private void validatePayeeInfo(Integer transferType, Map<String, String> payeeInfo) {
PayTransferTypeEnum transferTypeEnum = ofType(transferType);
PayTransferTypeEnum transferTypeEnum = typeOf(transferType);
switch (transferTypeEnum) {
case ALIPAY_BALANCE: {
if (StrUtil.isEmpty(MapUtil.getStr(payeeInfo, ALIPAY_LOGON_ID))) {

View File

@ -214,11 +214,11 @@ public class PayTransferServiceImpl implements PayTransferService {
}
private void validateChannelCodeAndTypeMatch(String channelCode, Integer type) {
PayTransferTypeEnum transferType = PayTransferTypeEnum.ofType(type);
PayTransferTypeEnum transferType = PayTransferTypeEnum.typeOf(type);
PayChannelEnum payChannel = PayChannelEnum.getByCode(channelCode);
switch (transferType) {
case ALIPAY_BALANCE: {
if (payChannel != PayChannelEnum.ALIPAY_TRANSFER) {
if (!payChannel.getCode().startsWith("alipay")) {
throw exception(PAY_TRANSFER_TYPE_AND_CHANNEL_NOT_MATCH);
}
break;