mirror of
https://github.com/valitydev/adapter-bank-payout-spring-boot-starter.git
synced 2024-11-06 00:45:21 +00:00
Added logs (#21)
Co-authored-by: Inal Arsanukaev <inalarsanukaev@MacBook-Pro-Inal.local>
This commit is contained in:
parent
998c87a9ab
commit
128916014e
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<artifactId>adapter-bank-payout-spring-boot-starter</artifactId>
|
||||
<version>1.0.7</version>
|
||||
<version>1.0.8</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Adapter-bank-payout-spring-boot-starter</name>
|
||||
|
@ -12,6 +12,7 @@ public class EntryStateModel {
|
||||
private String currencyCode;
|
||||
@ToString.Exclude
|
||||
private String pan;
|
||||
@ToString.Exclude
|
||||
private Map<String, String> options;
|
||||
|
||||
private AdapterState state;
|
||||
|
@ -34,13 +34,16 @@ public class PayoutAdapterService<T extends EntryStateModel, X extends ExitState
|
||||
public ProcessResult processWithdrawal(Withdrawal withdrawal, Value state, Map<String, String> options) throws TException {
|
||||
validator.validate(withdrawal, state, options);
|
||||
T entryStateModel = withdrawalToEntryStateConverter.convert(withdrawal, state, options);
|
||||
log.info("EntryStateModel: {}", entryStateModel);
|
||||
entryStateModel.getState().setStep(resolver.resolveEntry(entryStateModel));
|
||||
X exitStateModel = handlers.stream()
|
||||
.filter(h -> h.isHandle(entryStateModel))
|
||||
.findFirst()
|
||||
.orElseThrow(UnsupportedMethodException::new)
|
||||
.handle(entryStateModel);
|
||||
log.info("ExitStateModel: {}", exitStateModel);
|
||||
exitStateModel.getNextState().setStep(resolver.resolveExit(exitStateModel));
|
||||
log.info("Step changing: {} -> {}", entryStateModel.getState().getStep(), exitStateModel.getNextState().getStep());
|
||||
return exitStateToProcessResultConverter.convert(exitStateModel);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user