Package com.meawallet.mtp
Interface MeaCard
-
public interface MeaCard
Provides API for interaction with MeaTokenPlatform library card object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
authenticateWithCardPin(java.lang.String pin, MeaCardPinAuthenticationListener listener)
Authenticates transaction with Card Mobile PINvoid
changePin(java.lang.String oldPin, java.lang.String newPin)
Change card PIN.void
delete(MeaCardListener listener)
Deletes this card, network has to be available when invoke this method.void
deletePaymentTokens()
Clear the transaction tokens from card in the wallet.void
deselectForContactlessPayment()
Removes currently selected card to be used in contactless transactions.MeaAuthenticationMethod[]
getDigitizationAuthenticationMethods()
Returns list of card supported digitization authentication methods.MeaDigitizationDecision
getDigitizationDecision()
Returns digitization decision of this card digitization request.java.lang.String
getEligibilityReceipt()
Returns uniqueMeaEligibilityReceipt
value as provided byMeaTokenPlatform.initializeDigitization(MeaInitializeDigitizationParameters, MeaInitializeDigitizationListener)
initializeDigitization method}java.lang.String
getId()
Returns unique card ID for this card.PaymentNetwork
getPaymentNetwork()
Returns payment network.MeaProductConfig
getProductConfig()
Returns card product configuration..MeaCardState
getState()
Returns card state.java.lang.String
getTermsAndConditionsAssetId()
Returns Terms and Conditions Asset Id for this card.MeaTokenInfo
getTokenInfo()
Returns card token info.java.lang.Integer
getTransactionCredentialsCount()
Get number of available transaction credentials.void
getTransactionHistory(MeaGetCardTransactionHistoryListener listener)
Gets card transactions history data for the this card.java.util.List<MeaTransactionLog>
getTransactionLog()
Get the local transaction log for this card.MeaCardYellowPathState
getYellowPathState()
Returns card Yellow path state.boolean
isContactlessPaymentsSupported()
Checks if card supports contactless payments.boolean
isDefaultForContactlessPayments()
Returns true if this card is the default card for contactless payments.boolean
isDefaultForRemotePayments()
Returns true if this card is the default card for remote payments.boolean
isPinSet()
Checks if card PIN is set.boolean
isRemotePaymentsSupported()
Checks if card supports remote payments (DSRP).void
markForDeletion(MeaCardListener listener)
Changes card state to MeaCardState.MARKED_FOR_DELETION and schedules card deletion job.void
processRemoteTransaction(MeaRemotePaymentData data, MeaRemoteTransactionListener listener)
Starts a remote (DSRP) transaction.void
removeContactlessTransactionListener()
Removes Contactless Transaction listenervoid
removePinListener()
Removes Card PIN listener.void
replenishPaymentTokens()
Replenish PaymentTokens for this card.void
selectForContactlessPayment(MeaCardListener listener)
Sets the currently selected card to be used in contactless transactions.void
setAsDefaultForContactlessPayments()
Sets this card as the default for contactless payments.void
setAsDefaultForRemotePayments()
Sets this card as the default for remote payments (DSRP).void
setContactlessTransactionListener(MeaContactlessTransactionListener contactlessTransactionListener)
Sets listener to receive Contactless Transaction events.void
setPin(java.lang.String pin)
Set card PIN.void
setPinListener(MeaCardPinListener cardPinListener)
Sets listener to receive Card PIN events.boolean
stopContactlessTransaction()
Stops contactless transaction.void
unsetAsDefaultForContactlessPayments()
Unset this card as the default for contactless payments.void
unsetAsDefaultForRemotePayments()
Unset this card as the default for remote payments (DSRP).
-
-
-
Method Detail
-
getId
@NonNull java.lang.String getId()
Returns unique card ID for this card. In the case of an MDES solution the Unique card ID to be used is the Token Unique Reference for the card.- Returns:
- The unique card ID.
-
getEligibilityReceipt
@NonNull java.lang.String getEligibilityReceipt()
Returns uniqueMeaEligibilityReceipt
value as provided byMeaTokenPlatform.initializeDigitization(MeaInitializeDigitizationParameters, MeaInitializeDigitizationListener)
initializeDigitization method}- Returns:
- The
MeaEligibilityReceipt
value
-
getTermsAndConditionsAssetId
@Nullable java.lang.String getTermsAndConditionsAssetId() throws NotInitializedException, NotRegisteredException, MeaException
Returns Terms and Conditions Asset Id for this card.- Returns:
- Terms and Conditions Asset Id for this card
- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
getState
@Nullable MeaCardState getState() throws NotInitializedException, NotRegisteredException, MeaException
Returns card state.- Returns:
- instance of
MeaCardState
object. - Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
getYellowPathState
@Nullable MeaCardYellowPathState getYellowPathState() throws NotInitializedException, NotRegisteredException, MeaException
Returns card Yellow path state.- Returns:
- instance of
MeaCardYellowPathState
object. - Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
getDigitizationDecision
@Nullable MeaDigitizationDecision getDigitizationDecision() throws NotInitializedException, NotRegisteredException, MeaException
Returns digitization decision of this card digitization request.- Returns:
- instance of
MeaDigitizationDecision
object. - Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
getDigitizationAuthenticationMethods
@Nullable MeaAuthenticationMethod[] getDigitizationAuthenticationMethods() throws NotInitializedException, NotRegisteredException, MeaException
Returns list of card supported digitization authentication methods.- Returns:
- array of
MeaAuthenticationMethod
object instances. - Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
getProductConfig
@Nullable MeaProductConfig getProductConfig() throws NotInitializedException, NotRegisteredException, MeaException
Returns card product configuration..- Returns:
- instance of
MeaProductConfig
object. - Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
getTokenInfo
@Nullable MeaTokenInfo getTokenInfo() throws NotInitializedException, NotRegisteredException, MeaException
Returns card token info.- Returns:
- instance of
MeaTokenInfo
object. - Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
getPaymentNetwork
@Nullable PaymentNetwork getPaymentNetwork() throws NotInitializedException, NotRegisteredException, MeaException
Returns payment network.- Returns:
- Payment network used by particular card. Possible values: MASTERCARD/AMEX/VISA.
- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
isContactlessPaymentsSupported
boolean isContactlessPaymentsSupported() throws NotInitializedException, NotRegisteredException, MeaException
Checks if card supports contactless payments.- Returns:
- True if contactless payments are supported, false otherwise.
- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
isRemotePaymentsSupported
boolean isRemotePaymentsSupported() throws NotInitializedException, NotRegisteredException, MeaException
Checks if card supports remote payments (DSRP).- Returns:
- True if remote payments are supported, false otherwise.
- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
isPinSet
boolean isPinSet() throws NotInitializedException, NotRegisteredException, MeaException
Checks if card PIN is set.- Returns:
- True if card PIN is set, false otherwise.
- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
setPin
void setPin(java.lang.String pin) throws NotInitializedException, NotRegisteredException, InvalidInputException, MeaException
Set card PIN. Applies to Card PIN wallets only.- Parameters:
pin
- Card PIN value to be set as String- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.InvalidInputException
- if invalid input data is provided.MeaException
- if any other error occurred while processing method.
-
changePin
void changePin(java.lang.String oldPin, java.lang.String newPin) throws NotInitializedException, NotRegisteredException, InvalidInputException, MeaException
Change card PIN. Applies to Card PIN wallets only.- Parameters:
oldPin
- Old PIN value as StringnewPin
- New PIN value as String- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.InvalidInputException
- if invalid input data is provided.MeaException
- if any other error occurred while processing method.
-
isDefaultForContactlessPayments
boolean isDefaultForContactlessPayments() throws NotInitializedException, NotRegisteredException, MeaException
Returns true if this card is the default card for contactless payments.- Returns:
- Boolean value.
- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
isDefaultForRemotePayments
boolean isDefaultForRemotePayments() throws NotInitializedException, NotRegisteredException, MeaException
Returns true if this card is the default card for remote payments.- Returns:
- Boolean value.
- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
stopContactlessTransaction
boolean stopContactlessTransaction() throws NotInitializedException, NotRegisteredException, MeaException
Stops contactless transaction.- Returns:
- true - if contactless transaction was stopped successfully, false - is not
- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
selectForContactlessPayment
void selectForContactlessPayment(MeaCardListener listener)
Sets the currently selected card to be used in contactless transactions. Before selecting card it will do following checks:- NFC and HCE is available and enabled.
- App is set as default payment app in device settings.
- In case authentication required will check if authentication key is not permanently invalidated and if device secure unlock is set-up and ready.
- If card state is
MeaCardState.ACTIVE
. - If card supports contactless.
- If card has available payment tokens and will try replenish if number of payment tokens is zero.
- Parameters:
listener
-MeaCardListener
object instance.
-
deselectForContactlessPayment
void deselectForContactlessPayment() throws NotInitializedException, NotRegisteredException, MeaException
Removes currently selected card to be used in contactless transactions.- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
setAsDefaultForContactlessPayments
void setAsDefaultForContactlessPayments() throws NotInitializedException, NotRegisteredException, MeaCardException, MeaException
Sets this card as the default for contactless payments.- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaCardException
- if exception occurred while executing Card operation.MeaException
- if any other error occurred while processing method.
-
unsetAsDefaultForContactlessPayments
void unsetAsDefaultForContactlessPayments() throws NotInitializedException, NotRegisteredException, MeaException
Unset this card as the default for contactless payments. For app to be sure this card wont be used in transaction,deselectForContactlessPayment()
also needs to be invoked, because when starting payment, card to be used, is automatically set as selected.- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
setAsDefaultForRemotePayments
void setAsDefaultForRemotePayments() throws NotInitializedException, NotRegisteredException, MeaCardException, MeaException
Sets this card as the default for remote payments (DSRP).- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaCardException
- if exception occurred while executing Card operation.MeaException
- if any other error occurred while processing method.
-
unsetAsDefaultForRemotePayments
void unsetAsDefaultForRemotePayments() throws NotInitializedException, NotRegisteredException, MeaException
Unset this card as the default for remote payments (DSRP).- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.com.meawallet.mtp.DebuggerAttachedException
- if any other error occurred while processing method.MeaException
-
authenticateWithCardPin
void authenticateWithCardPin(java.lang.String pin, MeaCardPinAuthenticationListener listener)
Authenticates transaction with Card Mobile PIN- Parameters:
pin
- Card Mobile PIN as String.listener
- Card PIN authentication listener asMeaCardPinAuthenticationListener
object instance.
-
processRemoteTransaction
void processRemoteTransaction(MeaRemotePaymentData data, MeaRemoteTransactionListener listener)
Starts a remote (DSRP) transaction. It is mandatory for the wallet application to ensure that the authentication is explicitly performed before every DSRP transaction.- Parameters:
data
-MeaRemotePaymentData
object instance which contains all data required to process remote payment.listener
- Remote transaction listener asMeaRemoteTransactionListener
object instance.
-
getTransactionCredentialsCount
@Nullable java.lang.Integer getTransactionCredentialsCount() throws NotInitializedException, NotRegisteredException, MeaException
Get number of available transaction credentials.- Returns:
- number of available transaction credentials as Integer.
- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
replenishPaymentTokens
void replenishPaymentTokens()
Replenish PaymentTokens for this card.
-
deletePaymentTokens
void deletePaymentTokens() throws NotInitializedException, NotRegisteredException, MeaException
Clear the transaction tokens from card in the wallet.- Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
getTransactionLog
java.util.List<MeaTransactionLog> getTransactionLog() throws NotInitializedException, NotRegisteredException, MeaException
Get the local transaction log for this card. The number of transactions that are stored on the local database may vary for different implementations.- Returns:
- list of
MeaTransactionLog
object instances. - Throws:
NotInitializedException
- if library is not initialized.NotRegisteredException
- if library is not registered.MeaException
- if any other error occurred while processing method.
-
getTransactionHistory
void getTransactionHistory(MeaGetCardTransactionHistoryListener listener)
Gets card transactions history data for the this card.- Parameters:
listener
- Listener for card transaction history results.
-
markForDeletion
void markForDeletion(MeaCardListener listener)
Changes card state to MeaCardState.MARKED_FOR_DELETION and schedules card deletion job. When network connection will be available card deletion job will be executed and all cards with state MeaCardState.MARKED_FOR_DELETION will be deleted.- Parameters:
listener
-MeaCardListener
listener, success callback is invoked when card is marked for deletion.
-
delete
void delete(MeaCardListener listener)
Deletes this card, network has to be available when invoke this method.- Parameters:
listener
-MeaCardListener
listener, success callback is invoked when card is deleted both remotely and from local storage.
-
setContactlessTransactionListener
void setContactlessTransactionListener(MeaContactlessTransactionListener contactlessTransactionListener)
Sets listener to receive Contactless Transaction events.- Parameters:
contactlessTransactionListener
-MeaContactlessTransactionListener
listener
-
removeContactlessTransactionListener
void removeContactlessTransactionListener()
Removes Contactless Transaction listener
-
setPinListener
void setPinListener(MeaCardPinListener cardPinListener)
Sets listener to receive Card PIN events.- Parameters:
cardPinListener
-MeaCardPinListener
listener
-
removePinListener
void removePinListener()
Removes Card PIN listener.
-
-