Versions Compared

Key

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

A MOTO transaction is a manual entry transaction that is qualified as MOTO.

...

Code Block
    public static PaymentParams CreateWithOptions(PaymentServiceID service,
                                                  int amount,
                                                  int tipAmount,
                                                  int cashbackAmount,
                                                  boolean bMoTo)
    {
        PaymentParams params = new PaymentParams();
       
        //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);

        params.paramTree.AddEMVDate(ArkosTags.TransactionDate, cal.get(Calendar.YEAR) % 100, cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH));
        params.paramTree.AddEMVTime(ArkosTags.TransactionTime, cal.get(Calendar.HOUR), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND));
        params.paramTree.SetBin(ArkosTags.LocalTimezone, utcOffset);
        
        params.paramTree.SetAscii(ArkosTags.SelectedLanguage, LangHelper.getTerminalDefaultLanguage());


        //service
        params.paramTree.AddEnum(ArkosTags.SelectedService, service);

        // tip amount
        if (tipAmount != 0) {
            params.paramTree.AddBin(ArkosTags.SupplementaryAmount, IntToBCD(tipAmount));
        }

        // cashback amount
        if (cashbackAmount != 0) {
            params.paramTree.AddBin(ArkosTags.CashbackAmount, IntToBCD(cashbackAmount));
        }

        //Moto option
        if (bMoTo) {
            params.paramTree.AddBin(ArkosTags.MotoTransaction, new byte[]{0x01});
        }

        //total amount
        byte[] bcdAmount = IntToBCD(tipAmount + cashbackAmount + amount);
        if (bcdAmount == null) {
            return null;
        }
        params.paramTree.AddBin(TransactionAmount, bcdAmount);
        params.paramTree.AddBin(AmountAuthorised, bcdAmount);
        params.paramTree.AddBin(TransactionAmountBeforeAdjustment, bcdAmount);

        return params;
    }

NOTES: When MOTO is the chosen method, Please insert card step will be skipped as it will no longer be needed as this polling method will no longer be required.

Expected Arkos Callbacks :Please

refer to this section for the expected callbacks.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()

MOTO Transactions Callbacks