Package com.meawallet.mtp
Interface MeaContactlessTransactionListener
-
public interface MeaContactlessTransactionListener
Interface describing the various contactless transaction events.App developers should create a local instance of this class and pass it to
MeaCard.setContactlessTransactionListener(MeaContactlessTransactionListener)
to listen for events. Event callbacks are invoked on the Main / UI thread after the background computation finishes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onAuthenticationRequired(MeaCard meaCard, MeaContactlessTransactionData data)
Authentication is required to complete transaction.void
onContactlessPaymentFailure(MeaCard meaCard, MeaError error, MeaContactlessTransactionData data)
Contactless transaction finished with error.void
onContactlessPaymentStarted(MeaCard meaCard)
Notifies that contactless transaction was started.void
onContactlessPaymentSubmitted(MeaCard meaCard, MeaContactlessTransactionData data)
Contactless transaction successfully submitted.
-
-
-
Method Detail
-
onContactlessPaymentStarted
@UiThread void onContactlessPaymentStarted(@NonNull MeaCard meaCard)
Notifies that contactless transaction was started. Usage of this method is optional but highly recommended to improve UX. It allows to start opening Activity showing transaction progress and status before transaction status is received. Therefore transaction itself will look happening faster. It's recommended to make this Activity as lightweight as possible to reduce it's opening time.- Parameters:
meaCard
- The card for which contactless payment has been initiated.
-
onContactlessPaymentSubmitted
@UiThread void onContactlessPaymentSubmitted(@NonNull MeaCard meaCard, @NonNull MeaContactlessTransactionData data)
Contactless transaction successfully submitted.- Parameters:
meaCard
- The card for which contactless payment has been successfully submitted.data
- Contactless transaction data.
-
onContactlessPaymentFailure
@UiThread void onContactlessPaymentFailure(@NonNull MeaCard meaCard, @NonNull MeaError error, @NonNull MeaContactlessTransactionData data)
Contactless transaction finished with error.- Parameters:
meaCard
- The card for which contactless payment has failed.error
- Payment failure error.data
- Transaction data.
-
onAuthenticationRequired
@UiThread void onAuthenticationRequired(@NonNull MeaCard meaCard, @NonNull MeaContactlessTransactionData data)
Authentication is required to complete transaction. The terminal is holding context for second tap.- Parameters:
meaCard
- The card for which authentication is required.data
- Contactless transaction data.
-
-