Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

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.

Code Block
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.

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

...

Expand
titleAcceptorAuthorisationRequest

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:caaa.001.001.06">
  <AccptrAuthstnReq>
    <Hdr>
      <MsgFctn>AUTQ</MsgFctn>
      <PrtcolVrsn>6.0</PrtcolVrsn>
      <XchgId>53</XchgId>
      <CreDtTm>2022-02-22T08:00:41.000+00:00</CreDtTm>
      <InitgPty>
        <Id>Amadis</Id>
      </InitgPty>
      <RcptPty>
        <Id>Amadis</Id>
      </RcptPty>
    </Hdr>
    <AuthstnReq>
      <Envt>
        <Acqrr>
          <Id>
            <Id>10009287351</Id>
          </Id>
          <ParamsVrsn>2022-02-22 18:25:09</ParamsVrsn>
        </Acqrr>
        <Mrchnt>
          <Id>
            <Id>00000NEXOMER001</Id>
          </Id>
          <CmonNm>AMADIS 1111 Saint-Urbain Montréal</CmonNm>
        </Mrchnt>
        <POI>
          <Id>
            <Id>ASA00002</Id>
          </Id>
          <Cpblties>
            <CardRdngCpblties>PHYS</CardRdngCpblties>
            <CardRdngCpblties>MGST</CardRdngCpblties>
            <CardRdngCpblties>CICC</CardRdngCpblties>
            <CardRdngCpblties>ECTL</CardRdngCpblties>
            <CrdhldrVrfctnCpblties>FCPN</CrdhldrVrfctnCpblties>
            <CrdhldrVrfctnCpblties>MNSG</CrdhldrVrfctnCpblties>
            <CrdhldrVrfctnCpblties>FEPN</CrdhldrVrfctnCpblties>
            <ApprvlCdLngth>6</ApprvlCdLngth>
            <OnLineCpblties>SMON</OnLineCpblties>
            <MsgCpblties>
              <Dstn>CRCP</Dstn>
              <Dstn>MDSP</Dstn>
              <Dstn>MRCP</Dstn>
              <AvlblLang>en</AvlblLang>
              <AvlblLang>fr</AvlblLang>
              <AvlblLang>it</AvlblLang>
            </MsgCpblties>
          </Cpblties>
          <Cmpnt>
            <Tp>TERM</Tp>
            <Id>
              <PrvdrId>Google</PrvdrId>
              <Id>sdk_gphone_x86_arm</Id>
              <SrlNb>ArkosPay DEMOSN00</SrlNb>
            </Id>
            <Sts />
          </Cmpnt>
          <Cmpnt>
            <Tp>APLI</Tp>
            <Id>
              <PrvdrId>AMADIS</PrvdrId>
              <Id>ARKOS</Id>
            </Id>
            <Sts>
              <VrsnNb>3.0.8-dev-stub</VrsnNb>
            </Sts>
          </Cmpnt>
        </POI>
        <Card>
          <CardPdctPrfl>90</CardPdctPrfl>
          <CardBrnd>STANDARD</CardBrnd>
          <IntrnlCard>false</IntrnlCard>
        </Card>
        <Crdhldr>
          <Lang>fr</Lang>
        </Crdhldr>
      </Envt>
      <Cntxt>
        <PmtCntxt>
          <CardPres>false</CardPres>
          <CrdhldrPres>false</CrdhldrPres>
          <AttndncCntxt>ATTD</AttndncCntxt>
          <CardDataNtryMd>DFLE</CardDataNtryMd>
        </PmtCntxt>
      </Cntxt>
      <Tx>
        <TxCaptr>false</TxCaptr>
        <TxTp>RESA</TxTp>
        <SvcAttr>URES</SvcAttr>
        <MrchntCtgyCd>5555</MrchntCtgyCd>
        <TxId>
          <TxDtTm>2022-02-22T08:00:41.000+00:00</TxDtTm>
          <TxRef>00000024</TxRef>
        </TxId>
        <OrgnlTx>
          <SaleRefId>saleReferenceIdentification</SaleRefId>
          <TxId>
            <TxDtTm>2022-02-22T08:00:41.000-05:00</TxDtTm>
            <TxRef>0000000343</TxRef>
          </TxId>
          <POIId>
            <Id>Terminal1</Id>
            <Tp>ACCP</Tp>
            <Issr>ACCP</Issr>
            <ShrtNm>Term</ShrtNm>
          </POIId>
          <InitrTxId>InitiatorTransactionIdentification</InitrTxId>
          <RcptTxId>RecipientTransactionIdentification</RcptTxId>
          <TxTp>RESA</TxTp>
          <SvcAttr>IRES</SvcAttr>
          <CardDataNtryMd>MGST</CardDataNtryMd>
          <TxRslt>
            <AuthstnNtty>
              <Id>Identification</Id>
              <Tp>ACCP</Tp>
              <Issr>ACCP</Issr>
              <Ctry>Cou</Ctry>
              <ShrtNm>ShortName</ShrtNm>
            </AuthstnNtty>
            <RspnToAuthstn>
              <Rspn>APPR</Rspn>
              <RspnRsn>Reason</RspnRsn>
              <AddtlRspnInf>AdditionalInformation</AddtlRspnInf>
            </RspnToAuthstn>
            <AuthstnCd>000001</AuthstnCd>
          </TxRslt>
        </OrgnlTx>
        <RcncltnId>9</RcncltnId>
        <TxDtls>
          <Ccy>EUR</Ccy>
          <TtlAmt>5.00</TtlAmt>
          <AmtQlfr>INCR</AmtQlfr>
          <OnLineRsn>TRMF</OnLineRsn>
        </TxDtls>
      </Tx>
    </AuthstnReq>
  </AccptrAuthstnReq>
</Document>

Expand
titleAcceptorAuthorisationResponse

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:caaa.002.001.06">
  <AccptrAuthstnRspn>
    <Hdr>
      <MsgFctn>AUTP</MsgFctn>
      <PrtcolVrsn>6.0</PrtcolVrsn>
      <XchgId>53</XchgId>
      <CreDtTm>2022-02-23T01:00:41.466+00:00</CreDtTm>
      <InitgPty>
        <Id>Amadis</Id>
      </InitgPty>
      <RcptPty>
        <Id>Amadis</Id>
      </RcptPty>
    </Hdr>
    <AuthstnRspn>
      <Envt>
        <POIId>
          <Id>ASA00002</Id>
        </POIId>
      </Envt>
      <Tx>
        <TxId>
          <TxDtTm>2022-02-22T08:00:41.000+00:00</TxDtTm>
          <TxRef>00000024</TxRef>
        </TxId>
        <RcptTxId>000000000104</RcptTxId>
        <TxDtls>
          <Ccy>EUR</Ccy>
          <TtlAmt>5.00</TtlAmt>
          <ICCRltdData>ioECMDA=</ICCRltdData>
        </TxDtls>
      </Tx>
      <TxRspn>
        <AuthstnRslt>
          <RspnToAuthstn>
            <Rspn>APPR</Rspn>
          </RspnToAuthstn>
          <AuthstnCd>001898</AuthstnCd>
        </AuthstnRslt>
      </TxRspn>
    </AuthstnRspn>
  </AccptrAuthstnRspn>
</Document>

Expand
titleAcceptorCompletionAdvice

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:caaa.003.001.06">
  <AccptrCmpltnAdvc>
    <Hdr>
      <MsgFctn>CMPV</MsgFctn>
      <PrtcolVrsn>6.0</PrtcolVrsn>
      <XchgId>54</XchgId>
      <CreDtTm>2022-02-22T08:00:41.000+00:00</CreDtTm>
      <InitgPty>
        <Id>Amadis</Id>
      </InitgPty>
      <RcptPty>
        <Id>Amadis</Id>
      </RcptPty>
    </Hdr>
    <CmpltnAdvc>
      <Envt>
        <Acqrr>
          <Id>
            <Id>10009287351</Id>
          </Id>
          <ParamsVrsn>2022-02-22 18:25:09</ParamsVrsn>
        </Acqrr>
        <Mrchnt>
          <Id>
            <Id>00000NEXOMER001</Id>
          </Id>
          <CmonNm>AMADIS 1111 Saint-Urbain Montréal</CmonNm>
        </Mrchnt>
        <POI>
          <Id>
            <Id>ASA00002</Id>
          </Id>
          <Cpblties>
            <CardRdngCpblties>PHYS</CardRdngCpblties>
            <CardRdngCpblties>MGST</CardRdngCpblties>
            <CardRdngCpblties>CICC</CardRdngCpblties>
            <CardRdngCpblties>ECTL</CardRdngCpblties>
            <CrdhldrVrfctnCpblties>FCPN</CrdhldrVrfctnCpblties>
            <CrdhldrVrfctnCpblties>MNSG</CrdhldrVrfctnCpblties>
            <CrdhldrVrfctnCpblties>FEPN</CrdhldrVrfctnCpblties>
            <ApprvlCdLngth>6</ApprvlCdLngth>
            <OnLineCpblties>SMON</OnLineCpblties>
            <MsgCpblties>
              <Dstn>CRCP</Dstn>
              <Dstn>MDSP</Dstn>
              <Dstn>MRCP</Dstn>
              <AvlblLang>en</AvlblLang>
              <AvlblLang>fr</AvlblLang>
              <AvlblLang>it</AvlblLang>
            </MsgCpblties>
          </Cpblties>
          <Cmpnt>
            <Tp>TERM</Tp>
            <Id>
              <PrvdrId>Google</PrvdrId>
              <Id>sdk_gphone_x86_arm</Id>
              <SrlNb>ArkosPay DEMOSN00</SrlNb>
            </Id>
            <Sts />
          </Cmpnt>
          <Cmpnt>
            <Tp>APLI</Tp>
            <Id>
              <PrvdrId>AMADIS</PrvdrId>
              <Id>ARKOS</Id>
            </Id>
            <Sts>
              <VrsnNb>3.0.8-dev-stub</VrsnNb>
            </Sts>
          </Cmpnt>
        </POI>
        <Card>
          <CardPdctPrfl>90</CardPdctPrfl>
          <CardBrnd>STANDARD</CardBrnd>
        </Card>
      </Envt>
      <Cntxt>
        <PmtCntxt>
          <CardPres>false</CardPres>
          <CrdhldrPres>false</CrdhldrPres>
          <OnLineCntxt>true</OnLineCntxt>
          <AttndncCntxt>ATTD</AttndncCntxt>
          <CardDataNtryMd>DFLE</CardDataNtryMd>
        </PmtCntxt>
      </Cntxt>
      <Tx>
        <TxCaptr>false</TxCaptr>
        <TxTp>RESA</TxTp>
        <SvcAttr>URES</SvcAttr>
        <MrchntCtgyCd>5555</MrchntCtgyCd>
        <TxId>
          <TxDtTm>2022-02-22T08:00:41.000+00:00</TxDtTm>
          <TxRef>00000024</TxRef>
        </TxId>
        <OrgnlTx>
          <SaleRefId>saleReferenceIdentification</SaleRefId>
          <TxId>
            <TxDtTm>2022-02-22T08:00:41.000-05:00</TxDtTm>
            <TxRef>0000000343</TxRef>
          </TxId>
          <POIId>
            <Id>Terminal1</Id>
            <Tp>ACCP</Tp>
            <Issr>ACCP</Issr>
            <ShrtNm>Term</ShrtNm>
          </POIId>
          <InitrTxId>InitiatorTransactionIdentification</InitrTxId>
          <RcptTxId>RecipientTransactionIdentification</RcptTxId>
          <TxTp>RESA</TxTp>
          <SvcAttr>IRES</SvcAttr>
          <CardDataNtryMd>MGST</CardDataNtryMd>
          <TxRslt>
            <AuthstnNtty>
              <Id>Identification</Id>
              <Tp>ACCP</Tp>
              <Issr>ACCP</Issr>
              <Ctry>Cou</Ctry>
              <ShrtNm>ShortName</ShrtNm>
            </AuthstnNtty>
            <RspnToAuthstn>
              <Rspn>APPR</Rspn>
              <RspnRsn>Reason</RspnRsn>
              <AddtlRspnInf>AdditionalInformation</AddtlRspnInf>
            </RspnToAuthstn>
            <AuthstnCd>000001</AuthstnCd>
          </TxRslt>
        </OrgnlTx>
        <TxSucss>true</TxSucss>
        <Rvsl>false</Rvsl>
        <MrchntOvrrd>false</MrchntOvrrd>
        <RcptTxId>000000000104</RcptTxId>
        <RcncltnId>1</RcncltnId>
        <TxDtls>
          <Ccy>EUR</Ccy>
          <TtlAmt>5.00</TtlAmt>
          <AmtQlfr>INCR</AmtQlfr>
          <AuthrsdAmt>5.00</AuthrsdAmt>
        </TxDtls>
      </Tx>
    </CmpltnAdvc>
  </AccptrCmpltnAdvc>
</Document>

Expand
titleAcceptorCompletionAdviceResponse

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:caaa.004.001.06">
  <AccptrCmpltnAdvcRspn>
    <Hdr>
      <MsgFctn>CMPK</MsgFctn>
      <PrtcolVrsn>6.0</PrtcolVrsn>
      <XchgId>54</XchgId>
      <CreDtTm>2022-02-23T01:00:44.547+00:00</CreDtTm>
      <InitgPty>
        <Id>Amadis</Id>
      </InitgPty>
      <RcptPty>
        <Id>Amadis</Id>
      </RcptPty>
    </Hdr>
    <CmpltnAdvcRspn>
      <Envt>
        <AcqrrId>
          <Id>10009287351</Id>
        </AcqrrId>
        <MrchntId>
          <Id>00000NEXOMER001</Id>
        </MrchntId>
        <POIId>
          <Id>ASA00002</Id>
        </POIId>
      </Envt>
      <Tx>
        <TxId>
          <TxDtTm>2022-02-22T08:00:41.000+00:00</TxDtTm>
          <TxRef>00000024</TxRef>
        </TxId>
        <RcptTxId>000000000104</RcptTxId>
        <Rspn>APPR</Rspn>
      </Tx>
    </CmpltnAdvcRspn>
  </AccptrCmpltnAdvcRspn>
</Document>

...