Versions Compared

Key

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

Upon starting out a MOTO transaction, there will be one or more callback that requires additional user input depending on your config.

Below are the corresponding callbacks:

  • private byte[] manualEntrySelection()

  • private byte[] cvvEntry()

manualEntrySelection()

The first callback will ask the user for PAN Number and Expiration date.

merchantManualEntry()

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

expirationDate = “Expiration Date of the card to be entered by user”, a String (YYMM).

Code Block
    privatepublic byte[] manualEntrySelectionmerchantManualEntry() {
        TlvTree tlvTree = TlvTree.Empty();
        tlvTree.AddAscii(ArkosManualEntryTags.cardNumber, cardNumber"45301918312986731");
        tlvTree.AddAscii(ArkosManualEntryTags.expirationDate, expirationDate"2212" );
        return tlvTree.AsBytes();
    }

cvvEntry()

The Card Validation Digits are not necessary for a manual transaction. However, it can be configured if required and the following callback will be called to ask the user for CVV input.

How to configure cvv?

Ensure that in tag, Application Profile Settings (DF27), byte 2 bit 6 is set to 1.

...

merchantCVDEntry()

cvv = “cvv to be entered by user”, a String.

Code Block
    privatepublic byte[] manualEntrySelectionmerchantCVDEntry() {
        TlvTree tlvTree = TlvTree.Empty();
        tlvTree.AddAscii(ArkosManualEntryTags.cvv, cvv"232");
        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,

Code Block
    @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;  
     }

Code Block
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;
}

Image Added