StripeService class
A service class to handle Stripe payment integration
Features:
- Initializes Stripe with test/live mode
- Creates PaymentIntent on Stripe server
- Opens Stripe PaymentSheet
- Handles success/failure events
- Supports custom or default toast (like Razorpay service)
- Exposes callbacks for API calls after payment events
Constructors
Properties
Methods
-
init(
{required bool isTest, required String publishableKey}) → Future< void> - Initialize Stripe SDK
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stripePay(
{required int amount, required String currency, required String secretKey, required String merchantCountryCode, required String merchantDisplayName, String paymentGatewayName = "Stripe", String? description, dynamic onShowToast()?, dynamic onPaymentSuccess()?, dynamic onPaymentFailure()?}) → Future< void> - Opens Stripe Payment flow
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited