CheckoutOrchestrator class
Orchestrates the full card payment flow: checkout → fetch public key → encrypt → pay.
Consumers of the SDK should use this class instead of manually chaining CheckoutsService and GatewayService calls.
Usage
final orchestrator = CheckoutOrchestrator(
checkoutService: CheckoutsService.instance,
gatewayService: client.gateway!,
);
final result = await orchestrator.payWithCard(request, cardData);
if (result.isSuccess) {
print('Status: ${result.value!.status}');
}
Constructors
- CheckoutOrchestrator({required CheckoutsService checkoutService, required GatewayService gatewayService})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
payWithBill(
CheckoutRequest request) → Future< ValueResult< CheckoutResponse> > - Convenience method for bill (boleto) payments (one-step flow).
-
payWithCard(
CheckoutRequest request, CardPaymentData cardData) → Future< ValueResult< PaymentStatusResponse> > - Executes the full two-step card payment flow.
-
payWithPix(
String depositRequestId) → Future< ValueResult< DepositPixResponse> > - Convenience method for PIX payments (one-step flow).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited