DVPaystackBillingProvider class
Properties
-
apiBase
→ Uri
-
Paystack's API; another address only for a local stand-in.
final
-
callbackUrl
→ Uri
-
Where Paystack sends a subscriber after paying for a plan. Paystack
appends
reference and trxref.
final
-
entitlements
→ Map<String, Set<Entitlement>>
-
Paystack plan code to the entitlements a subscription to it grants.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
plans
→ Map<String, String>
-
Plan id to Paystack plan code (
PLN_...).
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
The HTTP header this provider signs under, such as
Stripe-Signature.
no setteroverride
Methods
-
checkout({required BillingPlan plan, required Object customer})
→ Future<DVBillingCheckoutSession>
-
override
-
checkoutOrder(DVBillingOrder order)
→ Future<DVBillingOrderCheckout>
-
Starts paying for
order and returns the provider's page.
override
-
handleWebhook(String payload, String signatureHeader)
→ Future<DVBillingWebhookResult>
-
Verifies
signatureHeader against payload and applies the event.
override
-
hasEntitlement(Object customer, Entitlement entitlement)
→ Future<bool>
-
override
-
invoices(Object customer, {int limit = 20})
→ Future<List<DVInvoice>>
-
Not read from Paystack: an empty history rather than an error.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
orderStatus({required String reference, String checkoutId = ''})
→ Future<DVBillingOrderStatus>
-
Asks the provider what happened to the payment for
reference.
checkoutId is the id checkoutOrder returned, for a provider that
looks payments up by its own id.
override
-
recordUsage({required Object customer, required DVUsageMeter meter, required int quantity, required String idempotencyKey, DateTime? at})
→ Future<void>
-
Paystack has no usage metering: refused, rather than recorded nowhere.
override
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
sign(String payload, String secretKey)
→ String
-
The hex HMAC-SHA512 Paystack sends for
payload.