Class TransactionContext


  • public class TransactionContext
    extends Object
    The TransactionContext class represents the context of a transaction, encompassing details such as the merchant name, transaction amount, and currency code.
    Since:
    3.0.0
    Version:
    3.0.0
    • Constructor Detail

      • TransactionContext

        public TransactionContext​(@NonNull
                                  String merchantName,
                                  @NonNull
                                  String amount,
                                  @NonNull
                                  String currencyCode)
        Constructs a new TransactionContext instance with the specified parameters.
        Parameters:
        merchantName - The name of the merchant (which cannot be null).
        amount - The transaction amount (which cannot be null).
        currencyCode - The currency code used for the transaction (which cannot be null).
    • Method Detail

      • getMerchantName

        @NonNull
        public String getMerchantName()
        Returns the name of the merchant.
        Returns:
        The merchant name.
      • getAmount

        @NonNull
        public String getAmount()
        Returns the transaction amount in ISO 4217 format. That is, with the correct number of digits after the decimal separator.
        Returns:
        The representation of Amount in ISO 4217 format.
      • getCurrencyCode

        @NonNull
        public String getCurrencyCode()
        Returns the ISO 4217 currency code where both numeric and alpha-numeric values are supported.
        Returns:
        The numeric code of the currency as specified in the ISO-4217 standard.