Add Cash App Pay iOS support and update notification colors
- Add CFBundleURLTypes with payfrit scheme for Cash App redirect - Add returnURL to Stripe PaymentSheet config - Update Podfile to specify iOS 13.0 platform - Change order status notification to Payfrit light green with black text Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
2491c961e0
commit
7f30b77112
4 changed files with 24 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '13.0'
|
||||
# Platform version for iOS
|
||||
platform :ios, '13.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
|
|
|||
|
|
@ -68,5 +68,16 @@
|
|||
<string>bluetooth-central</string>
|
||||
<string>location</string>
|
||||
</array>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>payfrit</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -392,18 +392,22 @@ class _CartViewScreenState extends State<CartViewScreen> {
|
|||
appState.clearActiveOrder();
|
||||
}
|
||||
|
||||
// Show notification using global scaffold messenger key
|
||||
// This works even after the cart screen is popped
|
||||
// Show snackbar notification with Payfrit light green
|
||||
rootScaffoldMessengerKey.currentState?.showSnackBar(
|
||||
SnackBar(
|
||||
content: Row(
|
||||
children: [
|
||||
Icon(Icons.notifications_active, color: Colors.white),
|
||||
SizedBox(width: 8),
|
||||
Expanded(child: Text(update.message)),
|
||||
const Icon(Icons.notifications_active, color: Colors.black),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'${update.statusName}: ${update.message}',
|
||||
style: const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
backgroundColor: _getStatusColorStatic(update.statusId),
|
||||
backgroundColor: const Color(0xFF90EE90), // Payfrit light green
|
||||
duration: const Duration(seconds: 5),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
margin: const EdgeInsets.only(bottom: 80, left: 16, right: 16),
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@ class StripeService {
|
|||
merchantDisplayName: 'Payfrit',
|
||||
paymentIntentClientSecret: clientSecret,
|
||||
style: ThemeMode.system,
|
||||
returnURL: 'payfrit://stripe-redirect', // Required for Cash App Pay on iOS
|
||||
appearance: const PaymentSheetAppearance(
|
||||
colors: PaymentSheetAppearanceColors(
|
||||
primary: Color(0xFF000000),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue