PaymentService class

Fachada de pagamento: o usuário só escolhe o provedor em PAYMENT_PROVIDER (asaas | mercadopago) e adiciona a credencial correspondente no .env.

Constructors

PaymentService(PaymentGateway gateway)
const
PaymentService.fromEnv(Map<String, String> env, {Client? client})
Seleciona o gateway pelo ambiente (lado servidor) via PaymentRegistry. Provedores novos entram com PaymentRegistry.register(...).
factory

Properties

configured bool
no setter
gateway PaymentGateway
final
hashCode int
The hash code for this object.
no setterinherited
provider String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkout(PaymentRequest request) Future<PaymentResult>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
webhookStatus(Map<String, dynamic> payload) PaymentStatus

Operators

operator ==(Object other) bool
The equality operator.
inherited