diff --git a/pom.xml b/pom.xml index c51fcc0..41076d7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.rbkmoney service-parent-pom - 1.1.1 + 1.2.0 fraudbusters-mg-connector @@ -55,6 +55,10 @@ com.rbkmoney damsel + + com.rbkmoney + mamsel + com.rbkmoney machinegun-proto diff --git a/src/main/java/com/rbkmoney/fraudbusters/mg/connector/converter/FistfulResourceToDomainResourceConverter.java b/src/main/java/com/rbkmoney/fraudbusters/mg/connector/converter/FistfulResourceToDomainResourceConverter.java index e308961..594b883 100644 --- a/src/main/java/com/rbkmoney/fraudbusters/mg/connector/converter/FistfulResourceToDomainResourceConverter.java +++ b/src/main/java/com/rbkmoney/fraudbusters/mg/connector/converter/FistfulResourceToDomainResourceConverter.java @@ -1,7 +1,8 @@ package com.rbkmoney.fraudbusters.mg.connector.converter; import com.rbkmoney.damsel.domain.BankCard; -import com.rbkmoney.damsel.domain.BankCardPaymentSystem; +import com.rbkmoney.damsel.domain.LegacyBankCardPaymentSystem; +import com.rbkmoney.damsel.domain.PaymentSystemRef; import com.rbkmoney.damsel.domain.Residence; import com.rbkmoney.damsel.fraudbusters.CryptoWallet; import com.rbkmoney.damsel.fraudbusters.Resource; @@ -15,7 +16,8 @@ import org.springframework.stereotype.Component; public class FistfulResourceToDomainResourceConverter implements Converter { - public static final BankCardPaymentSystem DEAFAULT_PAYMENT_SYSTEM = BankCardPaymentSystem.visa; + public static final PaymentSystemRef DEFAULT_PAYMENT_SYSTEM = + new PaymentSystemRef(LegacyBankCardPaymentSystem.visa.name()); public static final String UNKNOWN = "UNKNOWN"; @Override @@ -45,8 +47,8 @@ public class FistfulResourceToDomainResourceConverter ? Residence.valueOf(bankCardFrom.getIssuerCountry().name()) : null); bankCard.setPaymentSystem(bankCardFrom.isSetPaymentSystem() - ? BankCardPaymentSystem.valueOf(bankCardFrom.getPaymentSystem().name()) - : DEAFAULT_PAYMENT_SYSTEM); + ? new PaymentSystemRef(bankCardFrom.getPaymentSystem().name()) + : DEFAULT_PAYMENT_SYSTEM); bankCard.setLastDigits(bankCardFrom.getMaskedPan() != null ? bankCardFrom.getMaskedPan() : UNKNOWN); diff --git a/src/main/java/com/rbkmoney/fraudbusters/mg/connector/mapper/impl/PaymentMapper.java b/src/main/java/com/rbkmoney/fraudbusters/mg/connector/mapper/impl/PaymentMapper.java index cdb91df..10b7b02 100644 --- a/src/main/java/com/rbkmoney/fraudbusters/mg/connector/mapper/impl/PaymentMapper.java +++ b/src/main/java/com/rbkmoney/fraudbusters/mg/connector/mapper/impl/PaymentMapper.java @@ -13,6 +13,7 @@ import com.rbkmoney.fraudbusters.mg.connector.mapper.initializer.InfoInitializer import com.rbkmoney.fraudbusters.mg.connector.service.HgClientService; import com.rbkmoney.geck.common.util.TBaseUtil; import com.rbkmoney.machinegun.eventsink.MachineEvent; +import com.rbkmoney.mamsel.TokenProviderUtil; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -103,6 +104,6 @@ public class PaymentMapper implements Mapper