Class TapToPayCallbacks
java.lang.Object
com.codename1.payment.terminal.tap.TapToPayCallbacks
The entry points a port's TapToPayBridge calls back into. Not for
applications.
Every method may be called from any thread; each moves to the EDT before touching state. On iOS these are reached from native code by their C names, which is also what keeps them in a translated build.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe card was charged.static final intThe payment was canceled.static final intThe card was declined.static final intThe payment could not be attempted (SDK setup, connection, the PaymentIntent could not be retrieved); completes the request with an error rather than a result.static final intThe reader reported an error that is not a decline.static final intThe card may have been charged and the SDK could not say: completes the request with aTerminalOutcomeUnknownExceptioncarrying the transaction ID. -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeliverResult(int requestId, int status, String transactionId, String message) static voidfetchConnectionToken(int tokenRequestId) The SDK needs a connection token.
-
Field Details
-
STATUS_APPROVED
public static final int STATUS_APPROVEDThe card was charged.- See Also:
-
STATUS_DECLINED
public static final int STATUS_DECLINEDThe card was declined.- See Also:
-
STATUS_CANCELED
public static final int STATUS_CANCELEDThe payment was canceled.- See Also:
-
STATUS_FAILED
public static final int STATUS_FAILEDThe reader reported an error that is not a decline.- See Also:
-
STATUS_ERROR
public static final int STATUS_ERRORThe payment could not be attempted (SDK setup, connection, the PaymentIntent could not be retrieved); completes the request with an error rather than a result.- See Also:
-
STATUS_UNKNOWN
public static final int STATUS_UNKNOWNThe card may have been charged and the SDK could not say: completes the request with aTerminalOutcomeUnknownExceptioncarrying the transaction ID.- See Also:
-
-
Method Details
-
fetchConnectionToken
public static void fetchConnectionToken(int tokenRequestId) The SDK needs a connection token. Asks the
ConnectionTokenProviderof the most recent payment and answers withTapToPayBridge.connectionTokenReady(int, String, String).Parameters
tokenRequestId: the port's ID for this request, echoed back
-
deliverResult
The outcome of
TapToPayBridge.collect(int, String, long, String, String, String, boolean).Parameters
-
requestId: the request's ID -
status: one of theSTATUS_constants -
transactionId: the PaymentIntent ID, or null -
message: the SDK's explanation, or null
-
-