mirror of
https://github.com/valitydev/fraudbusters-mg-connector.git
synced 2024-11-06 01:15:17 +00:00
Add pending (#32)
This commit is contained in:
parent
154c519f04
commit
f8694312a5
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -7,6 +7,6 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: valitydev/base-workflow/.github/workflows/maven-service-build.yml@v1
|
||||
uses: valitydev/java-workflow/.github/workflows/maven-service-build.yml@v1
|
||||
with:
|
||||
ignore-coverage: true
|
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
uses: valitydev/base-workflow/.github/workflows/maven-service-deploy.yml@v1
|
||||
uses: valitydev/java-workflow/.github/workflows/maven-service-deploy.yml@v1
|
||||
secrets:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
|
@ -46,6 +46,7 @@ public class HgClientService {
|
||||
long sequenceId) {
|
||||
InvoicePaymentWrapper invoicePaymentWrapper = new InvoicePaymentWrapper();
|
||||
try {
|
||||
log.info("invoiceId: {} sequenceId: {}", invoiceId, sequenceId);
|
||||
Invoice invoiceInfo = invoicingClient.get(invoiceId, eventRangeFactory.create(sequenceId));
|
||||
if (invoiceInfo == null) {
|
||||
throw new PaymentInfoNotFoundException("Not found invoice info in hg!");
|
||||
|
@ -74,8 +74,12 @@ public class FraudbustersMgConnectorApplicationTest extends KafkaAbstractTest {
|
||||
|
||||
String sourceIdRefund2 = "sourceIdRefund2";
|
||||
mockPayment(sourceIdRefund2);
|
||||
mockRefund(sourceIdRefund2, 7, "1");
|
||||
mockRefund(sourceIdRefund2, 8, "2");
|
||||
mockRefund(sourceIdRefund2, 7, "2");
|
||||
mockRefund(sourceIdRefund2, 9, "2");
|
||||
mockRefund(sourceIdRefund2, 2, "2");
|
||||
mockRefund(sourceIdRefund2, 3, "2");
|
||||
mockRefund(sourceIdRefund2, 7, "1");
|
||||
sinkEvents = MgEventSinkFlowGenerator.generateRefundedFlow(sourceIdRefund2);
|
||||
sinkEvents.forEach(sinkEvent -> produceMessageToEventSink(MG_EVENT, sinkEvent));
|
||||
|
||||
@ -84,6 +88,8 @@ public class FraudbustersMgConnectorApplicationTest extends KafkaAbstractTest {
|
||||
String sourceChargeback = "source_chargeback";
|
||||
sinkEvents = MgEventSinkFlowGenerator.generateChargebackFlow(sourceChargeback);
|
||||
mockPayment(sourceChargeback);
|
||||
mockChargeback(sourceChargeback, 2, "1");
|
||||
mockChargeback(sourceChargeback, 3, "1");
|
||||
mockChargeback(sourceChargeback, 6, "1");
|
||||
sinkEvents.forEach(sinkEvent -> produceMessageToEventSink(MG_EVENT, sinkEvent));
|
||||
|
||||
@ -93,7 +99,7 @@ public class FraudbustersMgConnectorApplicationTest extends KafkaAbstractTest {
|
||||
sinkEvents = MgEventSinkFlowGenerator.generateSuccessFlow(SOURCE_ID);
|
||||
mockPaymentWithException(SOURCE_ID);
|
||||
sinkEvents.forEach(sinkEvent -> produceMessageToEventSink(MG_EVENT, sinkEvent));
|
||||
checkMessageInTopic(PAYMENT, PaymentDeserializer.class, 6);
|
||||
checkMessageInTopic(PAYMENT, PaymentDeserializer.class, 10);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user