mirror of
https://github.com/valitydev/fraudbusters-mg-connector.git
synced 2024-11-06 01:15:17 +00:00
commit
bd6011c25a
@ -1 +1 @@
|
||||
Subproject commit be44d69fc87b22a0bb82d98d6eae7658d1647f98
|
||||
Subproject commit a87ebf3ae5e56910dc6a0edcac7f90565368a3d1
|
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.rbkmoney</groupId>
|
||||
<artifactId>service-parent-pom</artifactId>
|
||||
<version>2.0.9</version>
|
||||
<version>2.0.11</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>fraudbusters-mg-connector</artifactId>
|
||||
@ -25,7 +25,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<machinegun-proto.version>1.18-d814d69</machinegun-proto.version>
|
||||
<fraudbusters-proto.version>1.97-28a6a95</fraudbusters-proto.version>
|
||||
<fraudbusters-proto.version>1.99-2a8f6ca</fraudbusters-proto.version>
|
||||
<fistful-proto.version>1.128-d331fce</fistful-proto.version>
|
||||
</properties>
|
||||
|
||||
|
@ -63,12 +63,13 @@ public class PaymentMapper implements Mapper<InvoiceChange, MachineEvent, Paymen
|
||||
private Payment initPayment(MachineEvent event, InvoicePaymentStatusChanged invoicePaymentStatusChanged,
|
||||
com.rbkmoney.damsel.domain.Invoice invoice, InvoicePayment invoicePayment, Payer payer,
|
||||
PaymentTool paymentTool) {
|
||||
var payment = invoicePayment.getPayment();
|
||||
return new Payment()
|
||||
.setStatus(TBaseUtil.unionFieldToEnum(invoicePaymentStatusChanged.getStatus(), PaymentStatus.class))
|
||||
.setCost(invoicePayment.getPayment().getCost())
|
||||
.setCost(payment.getCost())
|
||||
.setReferenceInfo(generalInfoInitiator.initReferenceInfo(invoice))
|
||||
.setPaymentTool(paymentTool)
|
||||
.setId(String.join(DELIMITER, invoice.getId(), invoicePayment.getPayment().getId()))
|
||||
.setId(String.join(DELIMITER, invoice.getId(), payment.getId()))
|
||||
.setEventTime(event.getCreatedAt())
|
||||
.setClientInfo(generalInfoInitiator.initClientInfo(payer))
|
||||
.setProviderInfo(generalInfoInitiator.initProviderInfo(invoicePayment))
|
||||
|
@ -47,13 +47,14 @@ public class GeneralInfoInitiator implements InfoInitializer<InvoicePaymentStatu
|
||||
clientInfo.setFingerprint(clientInfoRes.getFingerprint());
|
||||
}
|
||||
}
|
||||
initEmail(clientInfo, payer);
|
||||
initContactInfo(clientInfo, payer);
|
||||
return clientInfo;
|
||||
}
|
||||
|
||||
public void initEmail(ClientInfo clientInfo, Payer payer) {
|
||||
public void initContactInfo(ClientInfo clientInfo, Payer payer) {
|
||||
if (payer.isSetPaymentResource() && payer.getPaymentResource().isSetContactInfo()) {
|
||||
clientInfo.setEmail(payer.getPaymentResource().getContactInfo().getEmail());
|
||||
clientInfo.setPhone(payer.getPaymentResource().getContactInfo().getPhoneNumber());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ public interface InfoInitializer<T> {
|
||||
|
||||
ClientInfo initClientInfo(Payer payer);
|
||||
|
||||
void initEmail(ClientInfo clientInfo, Payer payer);
|
||||
void initContactInfo(ClientInfo clientInfo, Payer payer);
|
||||
|
||||
ProviderInfo initProviderInfo(InvoicePayment invoicePayment);
|
||||
|
||||
|
@ -47,8 +47,8 @@ public class RefundInfoInitiatorDecorator implements InfoInitializer<InvoicePaym
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initEmail(ClientInfo clientInfo, Payer payer) {
|
||||
generalInfoInitiator.initEmail(clientInfo, payer);
|
||||
public void initContactInfo(ClientInfo clientInfo, Payer payer) {
|
||||
generalInfoInitiator.initContactInfo(clientInfo, payer);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
Loading…
Reference in New Issue
Block a user