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

manualEntrySelection()

cardNumber = “PAN number to be entered by user”.

expirationDate = “Expiration Date of the card to be entered by user”.

    private byte[] manualEntrySelection() {
        TlvTree tlvTree = TlvTree.Empty();
        tlvTree.AddAscii(ArkosManualEntryTags.cardNumber, cardNumber);
        tlvTree.AddAscii(ArkosManualEntryTags.expirationDate, expirationDate );
        return tlvTree.AsBytes();
    }

cvvEntry()

cvv = “cvv to be entered by user”.

    private byte[] manualEntrySelection() {
        TlvTree tlvTree = TlvTree.Empty();
        tlvTree.AddAscii(ArkosManualEntryTags.cvv, cvv);
        return tlvTree.AsBytes();
    }

merchantConfirmPartiallyApprovedTransaction()

As explained in the previous document, Merchant confirmation of a partially approved transaction , if you need to access the transaction context and the required amounts, you can do the same as before, i.e,

    @Override
    public boolean merchantConfirmPartiallyApprovedTransaction(DisplayParams displayParams, byte[] bytes)
    {
      //get the amount as provided in the snippet below.
      //display them 
      //return true or false depending on the choice confirmation
      
      return true/false;  
     }

Tlvtree inner = TlvTree.FromRaw(bytes); // where bytes comes from the parameter of the above callback
private Integer requestedAmount;
private Integer amount;

public Integer getAmount() {
    byte[] amountBCD = inner.GetElementValue(ArkosTags.TransactionAmount);
    if(null != amountBCD) {
        amount = ArkosUtils.AmountBcdToInt(amountBCD);
        return amount;
    }
    return null;
}

public Integer getRequestedAmount() {
    byte[] amountBCD = inner.GetElementValue(ArkosTags.RequestedAmount);
    if(null != amountBCD) {
        requestedAmount = ArkosUtils.AmountBcdToInt(amountBCD);
        return requestedAmount;
    }
    return null;
}

public Integer getLeftToPay() {
    return requestedAmount - amount;
}

  • No labels