Amadis

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Nexo Retail Module Library now supports two reconciliation types:

  • SaleReconciliation

  • AcquirerSynchronisation

Sale Reconciliation

A sale reconciliation is simply an exchange of totals between the POI terminal and the Sale terminal.

Example of request message:

<?xml version="1.0"?>
<SaleToPOIRequest>
    <MessageHeader ProtocolVersion="3.0" MessageClass="Service" MessageCategory="Reconciliation" MessageType="Request" ServiceID="617" SaleID="ArkosSales" POIID="PreCertificationAmadis1" />
    <ReconciliationRequest  ReconciliationType="SaleReconciliation"/>
</SaleToPOIRequest>


Acquirer Synchronisation

An acquirer synchronisation is a reconciliation and closure of the current period with synchronisation between POI terminal and Acquirers.

Example of request message:

<?xml version="1.0"?>
<SaleToPOIRequest>
    <MessageHeader ProtocolVersion="3.0" MessageClass="Service" MessageCategory="Reconciliation" MessageType="Request" ServiceID="617" SaleID="ArkosSales" POIID="PreCertificationAmadis1" />
    <ReconciliationRequest  ReconciliationType="AcquirerSynchronisation"/>
</SaleToPOIRequest>


Upon sending the request, you can refer in RetailHandler.java class in ArkosPay on how the events are managed for a reconciliation request.


A wrapper function has been made available in ASL to get the reconciliation type from the requests.

Depending on the request, we execute the following steps.

 RetailReconciliaitonFragment.java
if(request.wrap().getReconciliationType() == ReconciliationType.SaleReconciliation)
{
    MaintenanceStartAsync(doGetTotals);
}
else if(request.wrap().getReconciliationType() == ReconciliationType.AcquirerSynchronisation)
{

    navigate(R.id.toChooseReconciliationType);
}

Once the result is obtained, the data is sent back to the Nexo Retail Module to be constructed using SendReconciliationResponse() function.

  ReconciliationRequest request = (ReconciliationRequest) PaymentSystem.getRetailHandler().getEvent();
        TransactionTotals transactionTotals = new TransactionTotals(receiptData);
        List<TransactionTotal> getTotalList = transactionTotals.getTotalList();

        PaymentSystem.getRetailHandler().SendReconciliationResponse(ReconciliationResponseBody.reconciliationResponseBody(request.wrap().getReconciliationType(),getTotalList));

An example of a reconciliation response body has been provided in ASL. You can put the data according to your own likings.

public class ReconciliationResponseBody {

    static public String reconciliationResponseBody(ReconciliationType reconciliationType, List<TransactionTotal> getTotalList) {

        String response = "<Response Result=\""+getTotalList.get(0).getReconciliationApproval()+"\" />";

        String paymentTotalsDebitMC = "<PaymentTotals TransactionType=\"Debit\" TransactionCount=\""+getTotalList.get(0).getTotalGroupList().get(2).getDebitCount()+"\" TransactionAmount= \""+getTotalList.get(0).getTotalGroupList().get(2).getDebitTotal()+"\"/>";
        String paymentTotalsCreditMC = "<PaymentTotals TransactionType=\"Credit\" TransactionCount=\""+getTotalList.get(0).getTotalGroupList().get(2).getCreditCount()+"\" TransactionAmount= \""+getTotalList.get(0).getTotalGroupList().get(2).getCreditTotal()+"\"/>";

        String transactionTotalsMC = "<TransactionTotals PaymentInstrumentType=\"Card\" AcquirerID=\""+getTotalList.get(0).getAcquirerIdentifier()+"\" CardBrand=\""+getTotalList.get(0).getTotalGroupList().get(2).getSchemeIdentifier()+"\">"+paymentTotalsDebitMC+""+paymentTotalsCreditMC+"</TransactionTotals>";

        String paymentTotalsDebitVisa = "<PaymentTotals TransactionType=\"Debit\" TransactionCount=\""+getTotalList.get(0).getTotalGroupList().get(1).getDebitCount()+"\" TransactionAmount= \""+getTotalList.get(0).getTotalGroupList().get(1).getDebitTotal()+"\"/>";
        String paymentTotalsCreditVisa = "<PaymentTotals TransactionType=\"Credit\" TransactionCount=\""+getTotalList.get(0).getTotalGroupList().get(1).getCreditCount()+"\" TransactionAmount= \""+getTotalList.get(0).getTotalGroupList().get(1).getCreditTotal()+"\"/>";

        String transactionTotalsVisa = "<TransactionTotals PaymentInstrumentType=\"Card\" AcquirerID=\""+getTotalList.get(0).getAcquirerIdentifier()+"\" CardBrand=\""+getTotalList.get(0).getTotalGroupList().get(1).getSchemeIdentifier()+"\">"+paymentTotalsDebitVisa+""+paymentTotalsCreditVisa+"</TransactionTotals>";

        return "<ReconciliationResponse ReconciliationType=\""+reconciliationType+"\">" + response + transactionTotalsMC+ transactionTotalsVisa+ "</ReconciliationResponse>";
    }

}

In getTotalGroupList, you will get access to a list of schemes. The order of schemes will be related to the order of your schemes in ATHEOS.

  • No labels