You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Stripe-based checkout and per-user cart persistence plus push-deeplink handling.
Highlights:
- Stripe: add flutter_stripe dependency, initialize publishable key in main, and switch Android activity to FlutterFragmentActivity to support Stripe PaymentSheet.
- Server: add a Supabase Edge Function (create-payment-intent) to create Stripe PaymentIntents and a DB migration to add payment fields to orders (payment_provider, payment_intent_id, payment_status).
- Marketplace repo: new CreatePaymentIntentResult, createStripePaymentIntent() to call the edge function, and payment-aware placeOrder() plus stock validation and out-of-stock errors.
- Cart: CartController persists cart per authenticated user to SharedPreferences (debounced), loads/clears on auth changes, and integrates Stripe PaymentSheet into the checkout flow; CartItemModel and ProductModel gains JSON serialization helpers.
- Push notifications: add push_deeplink_routes helper, wire notification-opened handler in PushNotificationCoordinator, and implement registerOnNotificationOpenedHandler in PushNotificationService to route users into the app on notification taps.
- Build/config: update pubspec.yaml/lock for flutter_stripe, tweak android/gradle.properties for JDK/tooling and Kotlin incremental compile, and adjust Supabase CLI config and functions config for the new edge function.
These changes enable on-device checkout with server-side PaymentIntent creation, persist carts across sessions per user, and deep-link users from notifications into the appropriate screens.
0 commit comments