PROX-458: fix uuid (#11)

* PROX-458: fix uuid
This commit is contained in:
malkoas 2020-10-19 17:43:30 +03:00 committed by GitHub
parent 78ebd1c5e4
commit a89f081b07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,8 +22,6 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static java.math.RoundingMode.HALF_UP;
@Component
@RequiredArgsConstructor
public class CtxToEntryModelConverter implements Converter<CashregContext, EntryStateModel> {
@ -38,7 +36,11 @@ public class CtxToEntryModelConverter implements Converter<CashregContext, Entry
EntryStateModel.EntryStateModelBuilder builder = EntryStateModel.builder();
builder.options(options);
builder.cashRegId(context.getCashregId());
if (adapterState.getReceiptId() != null) {
builder.cashRegId(adapterState.getReceiptId());
} else {
builder.cashRegId(context.getCashregId());
}
PaymentInfo paymentInfo = context.getSourceCreation().getPayment();
builder.client(Client.builder()