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 version for iOS
|
||||||
# platform :ios, '13.0'
|
platform :ios, '13.0'
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
|
||||||
|
|
@ -68,5 +68,16 @@
|
||||||
<string>bluetooth-central</string>
|
<string>bluetooth-central</string>
|
||||||
<string>location</string>
|
<string>location</string>
|
||||||
</array>
|
</array>
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Editor</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>payfrit</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
||||||
|
|
@ -392,18 +392,22 @@ class _CartViewScreenState extends State<CartViewScreen> {
|
||||||
appState.clearActiveOrder();
|
appState.clearActiveOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show notification using global scaffold messenger key
|
// Show snackbar notification with Payfrit light green
|
||||||
// This works even after the cart screen is popped
|
|
||||||
rootScaffoldMessengerKey.currentState?.showSnackBar(
|
rootScaffoldMessengerKey.currentState?.showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Row(
|
content: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.notifications_active, color: Colors.white),
|
const Icon(Icons.notifications_active, color: Colors.black),
|
||||||
SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Expanded(child: Text(update.message)),
|
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),
|
duration: const Duration(seconds: 5),
|
||||||
behavior: SnackBarBehavior.floating,
|
behavior: SnackBarBehavior.floating,
|
||||||
margin: const EdgeInsets.only(bottom: 80, left: 16, right: 16),
|
margin: const EdgeInsets.only(bottom: 80, left: 16, right: 16),
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,7 @@ class StripeService {
|
||||||
merchantDisplayName: 'Payfrit',
|
merchantDisplayName: 'Payfrit',
|
||||||
paymentIntentClientSecret: clientSecret,
|
paymentIntentClientSecret: clientSecret,
|
||||||
style: ThemeMode.system,
|
style: ThemeMode.system,
|
||||||
|
returnURL: 'payfrit://stripe-redirect', // Required for Cash App Pay on iOS
|
||||||
appearance: const PaymentSheetAppearance(
|
appearance: const PaymentSheetAppearance(
|
||||||
colors: PaymentSheetAppearanceColors(
|
colors: PaymentSheetAppearanceColors(
|
||||||
primary: Color(0xFF000000),
|
primary: Color(0xFF000000),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue