Amadis

Original Transaction (Using Nexo ACQ)

Based on your protocol, acquirer, or your transaction context, some of the following values could be mandatory as well as required.

This document applies to the Nexo version of the original transaction.

If you need specific values in your original transaction structures, an example will be provided below.

NOTE: If the original transaction is retrieved from the database, the values will be overwritten.

public static void createOriginalTransaction(PaymentParams params, String transactionReference, PaymentServiceID serviceID){ TlvTree originalTrx = params.paramTree.AddChild(ArkosTags.OriginalTransaction); originalTrx.AddAscii(ArkosTags.SaleReferenceIdentification,"saleReferenceIdentification"); //Date //Time //Timezone Calendar cal = Calendar.getInstance(); int utcOffsetMinutes = cal.getTimeZone().getOffset(cal.getTimeInMillis()) / 1000 / 60; byte[] utcOffset = new byte[2]; utcOffset[0] = (byte) (utcOffsetMinutes / 60); utcOffset[1] = (byte) (utcOffsetMinutes % 60); originalTrx.AddEMVDate(TransactionIdentificationID.Date, cal.get(Calendar.YEAR) % 100, cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH)); originalTrx.AddEMVTime(TransactionIdentificationID.Time, cal.get(Calendar.HOUR), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND)); originalTrx.SetBin(ArkosTags.LocalTimezone, utcOffset); originalTrx.AddAscii(TransactionIdentificationID.ReferenceData, transactionReference); TlvTree poiIdentification = originalTrx.AddChild(ArkosTags.PoiIdentification); poiIdentification.AddAscii(POIIdentificationID.TerminalIdentification,"Terminal1"); poiIdentification.AddEnum(POIIdentificationID.Type, POIIdentificationTypeID.ACCP); poiIdentification.AddEnum(POIIdentificationID.Issuer, POIIdentificationIssuerID.ACCP); poiIdentification.AddAscii(POIIdentificationID.ShortName,"Term"); originalTrx.AddAscii(ArkosTags.InitiatorTransactionIdentification,"InitiatorTransactionIdentification"); originalTrx.AddAscii(ArkosTags.RecipientTransactionIdentification,"RecipientTransactionIdentification"); originalTrx.AddEnum(ArkosTags.SelectedService, serviceID); originalTrx.AddEnum(ArkosTags.TechnologySelected, SelectedTechnologyID.MagneticStripe); // originalTrx.AddBin(ArkosTags.CashbackPresent, new byte[]{0x01}); // originalTrx.AddBin(ArkosTags.SupplementaryAmountPresent, new byte[]{0x01}); TlvTree transactionResult = originalTrx.AddChild(ArkosTags.TransactionResult); TlvTree authorisationEntity = transactionResult.AddChild(TransactionResultID.AuthorisationEntity); authorisationEntity.AddAscii(AuthorisationEntityID.AuthorisationEntityIdentification,"Identification"); authorisationEntity.AddEnum(AuthorisationEntityID.AuthorisationEntityType, AuthorisationEntityTypeID.ACCP); authorisationEntity.AddEnum(AuthorisationEntityID.AuthorisationEntityIssuer, AuthorisationEntityIssuerID.ACCP); authorisationEntity.AddAscii(AuthorisationEntityID.AuthorisationEntityCountry,"Cou"); authorisationEntity.AddAscii(AuthorisationEntityID.AuthorisationEntityShortName,"ShortName"); TlvTree responseToAuthorisation = transactionResult.AddChild(TransactionResultID.ResponseToAuthorisation); responseToAuthorisation.AddEnum(ResponseToAuthorisationID.Response, ResponseID.APPR); responseToAuthorisation.AddAscii(ResponseToAuthorisationID.ResponseReason,"Reason"); responseToAuthorisation.AddAscii(ResponseToAuthorisationID.AdditionalResponseInformation,"AdditionalInformation"); transactionResult.AddAscii(TransactionResultID.AuthorisationCode,"000001"); }

NOTE: If your original transaction is of type payment, you can add those two tags if you want to include the presence of cashback or supplementary amount.

originalTrx.AddBin(ArkosTags.CashbackPresent, new byte[]{0x01}); originalTrx.AddBin(ArkosTags.SupplementaryAmountPresent, new byte[]{0x01});

 

How to use this with Cancellation, Update-pre auth, and Payment Completion?

 

public static PaymentParams createPaymentCompletion(String transactionReference, int amount) { PaymentParams params = new PaymentParams(); setTerminalInfo(params); //service params.paramTree.AddEnum(ArkosTags.SelectedService, PaymentServiceID.PaymentCompletion); createOriginalTransaction(params,transactionReference,PaymentServiceID.Preauth); //Amount byte[] bcdAmount = IntToBCD(amount); if (bcdAmount == null) { return null; } params.paramTree.AddBin(TransactionAmount, bcdAmount); params.paramTree.AddBin(AmountAuthorised, bcdAmount); params.paramTree.AddBin(TransactionAmountBeforeAdjustment, bcdAmount); return params; }

 

 

 

 

 

 

 

 

 

Â