Checkout class
Constructors
- Checkout({bool testing = false, BaseTokensRepository? tokensRepository, BaseCustomerRepository? customerRepository, BasePaymentsRepository? paymentsRepository, BaseInstrumentRepository? instrumentRepository, required String secretKey, required String publicKey})
Properties
- customerRepository ↔ BaseCustomerRepository
-
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- instrumentRepository ↔ BaseInstrumentRepository
-
latefinal
- paymentsRepository ↔ BasePaymentsRepository
-
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tokensRepository ↔ BaseTokensRepository
-
latefinal
Methods
-
createCustomer(
Customer customer) → Future< String?> -
Store a customer's details in a customer object to reuse in future payments.
Link a payment instrument using the Update customer details endpoint,
so the customer
id
returned can be passed as a source when making a payment.override -
createInstrument(
{required InstrumentRequest instrumentRequest}) → Future< Instrument> -
Exchange a single use Checkout.com token for a payment instrument reference,
that can be used at any time to request one or more payments.
override
-
deleteInstrument(
String id) → Future< void> -
Delete a payment instrument
override
-
getCustomerDetails(
String id) → Future< Customer> -
Returns details of a customer and their instruments
override
-
getDefaultInstrument(
List< Instrument> instruments) → Future<Instrument?> -
override
-
getInstrumentDetails(
String id) → Future< Instrument> -
Returns details of an instrument using
id
override -
getPaymentDetails(
String id) → Future< PaymentResponse> -
Returns the details of the payment with the specified identifier string.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestIdPayment(
{required PaymentRequest paymentRequest}) → Future< PaymentResponse> -
override
-
requestToken(
TokenRequest tokenRequest) → Future< TokenResponse> -
Exchange a digital wallet payment token or card details
for a reference token that can be used later to request a card payment.
Tokens are single use and expire after 15 minutes.
To create a token, please authenticate using your public key.
override
-
requestTokenPayment(
{required PaymentRequest paymentRequest, CreditCard? card, ApplePayTokenData? applePayTokenData, required PaymentMethod method}) → Future< PaymentResponse> -
pay using The Checkout.com token (e.g., a card or digital wallet token)
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateInstrument(
{required Instrument instrument, required InstrumentRequest instrumentRequest}) → Future< Instrument> -
Update details of an instrument
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited