updating sequence of flows
This commit is contained in:
@@ -76,7 +76,7 @@ public class StewardIntegrationProcessor implements TransactionProcessorInterfac
|
||||
.build();
|
||||
|
||||
if(Objects.equals(powertelClientId, transaction.getBillClientId())) {
|
||||
logger.info("send confirmation again");
|
||||
logger.info("send confirmation again for - " + transaction.getBillClientId());
|
||||
String url = aggregatorUrl + "/merchant/aggregation/transaction";
|
||||
LinkedHashMap response = restService.postWithToken(token, url, request, LinkedHashMap.class);
|
||||
logger.info("response: {}", response.toString());
|
||||
|
||||
@@ -66,7 +66,7 @@ public class TransactionWorkflow extends WorkflowDefinition {
|
||||
permit(GATEWAY_PAYMENT_SUCCESS, INTEGRATION);
|
||||
permit(INTEGRATION, PURCHASE_INVOICE, TRAN_FAILED);
|
||||
permit(PURCHASE_INVOICE, PURCHASE_INVOICE_PAYMENT);
|
||||
permit(PURCHASE_INVOICE_PAYMENT, PURCHASE_INVOICE_PAYMENT_SUCCESS);
|
||||
permit(PURCHASE_INVOICE_PAYMENT, PURCHASE_INVOICE_PAYMENT_SUCCESS, DONE);
|
||||
permit(PURCHASE_INVOICE_PAYMENT_SUCCESS, POLL_STATUS);
|
||||
permit(POLL_STATUS, SALES_INVOICE, TRAN_FAILED);
|
||||
permit(SALES_INVOICE, JOURNAL_ENTRY);
|
||||
@@ -219,6 +219,13 @@ public class TransactionWorkflow extends WorkflowDefinition {
|
||||
transaction = (Transaction) handlerInterface.process(transaction);
|
||||
|
||||
execution.setVariable("body", Utils.toJson(transaction));
|
||||
|
||||
// it's possible to have a flow that ends up event though
|
||||
// polling has already happened
|
||||
if(transaction.getPollingStatus() == Status.SUCCESS){
|
||||
return NextAction.moveToState(DONE,
|
||||
"Polling already complete");
|
||||
}
|
||||
return NextAction.moveToState(PURCHASE_INVOICE_PAYMENT_SUCCESS,
|
||||
"Purchase invoice payment generated - id: " + transaction.getErpPurchasePaymentRef());
|
||||
}catch (Exception e) {
|
||||
|
||||
@@ -52,3 +52,6 @@ nflow.db.postgresql.user=postgres
|
||||
nflow.db.postgresql.password=zdDZMzq6F4B4L1IUl
|
||||
|
||||
powertel.clientid=powertel_zesa
|
||||
|
||||
ecocash.apikey=OUzGezwTgktLg_9v0I48I6WUM4LVLGFl
|
||||
ecocash.url=https://developers.ecocash.co.zw/api/ecocash_pay/api/v2/payment/instant/c2b/sandbox
|
||||
|
||||
@@ -66,4 +66,7 @@ spring.mail.password=QdZucpJMJIZ
|
||||
spring.mail.properties.mail.smtp.auth=true
|
||||
spring.mail.properties.mail.smtp.starttls.enable=true
|
||||
|
||||
powertel.clientid=zesa_prepaid_usd
|
||||
powertel.clientid=zesa_prepaid_usd
|
||||
|
||||
ecocash.apikey=OUzGezwTgktLg_9v0I48I6WUM4LVLGFl
|
||||
ecocash.url=https://developers.ecocash.co.zw/api/ecocash_pay/api/v2/payment/instant/c2b/sandbox
|
||||
|
||||
Reference in New Issue
Block a user