Class E2eEncryptedDigitizationParameters

    • Constructor Summary

      Constructors 
      Constructor Description
      E2eEncryptedDigitizationParameters​(PaymentNetwork paymentNetwork, java.lang.String bin, java.lang.String accountNumber, java.lang.String name, java.lang.String expirationMonth, java.lang.String expirationYear)
      Creates instance of parameters for digitisation with e2e encrypted data.
    • Constructor Detail

      • E2eEncryptedDigitizationParameters

        public E2eEncryptedDigitizationParameters​(@NonNull
                                                  PaymentNetwork paymentNetwork,
                                                  @NonNull
                                                  java.lang.String bin,
                                                  @NonNull
                                                  java.lang.String accountNumber,
                                                  @NonNull
                                                  java.lang.String name,
                                                  @NonNull
                                                  java.lang.String expirationMonth,
                                                  @NonNull
                                                  java.lang.String expirationYear)
                                           throws NotInitializedException,
                                                  MeaException
        Creates instance of parameters for digitisation with e2e encrypted data.
        Parameters:
        paymentNetwork - Payment network as instance of PaymentNetwork. Only VISA supported.
        bin - Card BIN. Min length 6, max length 16.
        accountNumber - Card PAN. Min length 9, max length 19.
        name - Name of the Cardholder in a format FIRSTNAME LASTNAME. Max length 256.
        expirationMonth - Month of card expiration date.
        expirationYear - Year of card expiration date.
        Throws:
        NotInitializedException - if MeaTokenPlatform is not initialized. Use MeaCheckedException.getErrorCode() to get failure reason error code.
        MeaException - if MeaTokenPlatform is not initialized/registered and necessary encryption keys are not available. Use MeaCheckedException.getErrorCode() to get failure reason error code.
    • Method Detail

      • getAccountNumberLength

        public int getAccountNumberLength()
        Return length of the card PAN.
        Returns:
        Length of the card PAN.
      • getAccountNumberHash

        public java.lang.String getAccountNumberHash()
                                              throws com.meawallet.mtp.MeaCryptoException
        Returns hash (sha256) of the card PAN.
        Returns:
        Hash (sha256) of the card PAN.
        Throws:
        com.meawallet.mtp.MeaCryptoException - if calculation of sha256 fails. Use Throwable.getMessage() to get failure reason error code.
      • getBin

        public java.lang.String getBin()
        Returns BIN of the card.
        Returns:
        BIN of the card.
      • getPaymentNetwork

        public PaymentNetwork getPaymentNetwork()
        Return payment network.
        Returns:
        Payment network as instance of PaymentNetwork
      • getE2eDataEncryptedPayload

        public java.lang.String getE2eDataEncryptedPayload()
                                                    throws java.security.NoSuchAlgorithmException,
                                                           com.meawallet.mtp.MeaCryptoException
        Encrypts card data for using in digitisation with e2e encrypted data.
        Returns:
        Encrypted card data.
        Throws:
        java.security.NoSuchAlgorithmException - if device doesn't support MD5 algorithm.
        com.meawallet.mtp.MeaCryptoException - if payload encryption fails. Use Throwable.getMessage() to get failure reason error code.