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 5 Next »

The Sale Reference ID is a data that can be passed on and transfer from an Nexo Payment request incoming from the Sale Terminal. In order to display such data to the message response from Arkos, this one need to be added to the Aquired Proprietary Data directory.

To do so, the following block of code has been implemented and added in the Arkos Pay Application:

public static PaymentParams createFromRetail(NexoRequest req) {
        PaymentParams params = new PaymentParams();

        if (req instanceof PaymentRequest) {
            PaymentRequest paymentReq = (PaymentRequest) req;

            String saleReferenceID = paymentReq.SaleReferenceID;
            params.paramTree = TlvTree.FromRaw(paymentReq.preparedPaymentData);
            TlvTree acquirerProprietaryData = params.paramTree.AddChild(0xFFBF2F);
            acquirerProprietaryData.SetAscii(0xDFCF01,saleReferenceID);

            ...
            
        } else if (req instanceof ReversalRequest) {
            ...
            }
        } else {
            ...
        }
        ...
    }

The Retail Module (ASL) is accused of receiving the Payment XML file request where the Sale Reference ID is located in paymentReq.SaleReferenceID. This one is then passed in ArksoPay through saleReferenceID for it to get set, afterwards, in the ACQUIRER_PROPRIETARY_DATA directory.

The previously given script will provide you details of the implementation made for the addition of the Sale Reference ID attribute in the ACQUIRER_PROPRIETARY_DATA directory. This one will be then be appearing in the Message Request Response from Nexo Retail (i.e: Accepted Authorization Request response).

Example of Payment request with Sale Reference ID:

<?xml version="1.0"?>
<SaleToPOIRequest>
    <MessageHeader MessageClass="Service" MessageCategory="Payment" MessageType="Request" ServiceID="2" SaleID="ArkosSales" POIID="87654321"/>
    <PaymentRequest>
        <SaleData SaleReferenceID="ArkosSale42">
            <SaleTransactionID TransactionID="1" TimeStamp="2019-08-21T14:48:05+05:00"/>
        </SaleData>
        <PaymentTransaction>
            <AmountsReq Currency="EUR" RequestedAmount="5.00"/>
        </PaymentTransaction>
        <PaymentData/>
    </PaymentRequest>
</SaleToPOIRequest>

Example of response with the resulting Sale Reference ID:

<AccptrAuthstnReq>
	<Hdr>
		...
		<InitgPty>
			<Id>MONEY2020VEGA$</Id>
		</InitgPty>
		<RcptPty>
			<Id>Amadis</Id>
		</RcptPty>
	</Hdr>
	<AuthstnReq>
		...
		<Tx>
			...
			<SaleRefId>ArkosSale42</SaleRefId>
			...
		</Tx>
	</AuthstnReq>
	<SctyTrlr>
		...
	</SctyTrlr>
</AccptrAuthstnReq>

An example of the ACQUIRER_PROPRIETARY_DATA can be found in the folliwing snipped of the directory:

, 0xFFBF2F: 
        [ 0xDFCF01: 41726b6f7353616c653432
        , 0xFFDF02: 
                [ 0xFF01: 
                        [ 0xC1: 4864722f496e6974675074792f4964
                        , 0xC2: 4d4f4e4559323032305645474124
                        ]
                ]
        , 0xDFBF01: 303030303030303030323336
        , 0xFFBF05: 
                [ 0xFFFF6A: 
                        [ 0xDF01: 01
                        , 0xDFBF03: 44656661756c74206265686176696f72
                        , 0xDFBF04: 4e6f2074657374206361736520747269676765726564
                        ]
                ]
        ]
  • No labels