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 »

The Sale Reference ID is a data tha can be passed on and transfer from Nexo requests incoming from the Sale Terminal. In order to display such data to the message response from Arkos, this one needs to be added to the Aquired Proprietery 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 {
            ...
        }
        ...
    }

This script will provide you the addition of the Sale Reference ID attribute in the ACQUIRER_PROPRIETARY_DATA directory. This one will be then appear in the Message Request Response from Nexo Retail (i.e: Accepted Authorization Request response).

<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