flutter_stripe
flutter_stripe copied to clipboard
To document urlScheme and it's iOS/Android setup
Proposal to have a dedicated doc for the urlScheme settings. It's not really documented anywhere(even didn't find it in Stripe iOS/Android SDK docs).
But e.g. PayPal setup intent on iOS doesn't work without it (throws exception: "You must provide a return_url when confirming a SetupIntent with the payment method type paypal").
So the proposal is to mention these pieces of code, and explain what is "safepay"(seems like a const from Stripe), and what is "flutterstripe" (can be anything?)
-
flutter -
main.dart:Stripe.urlScheme = 'flutterstripe'; -
iOS -
Info.plist:
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>safepay</string>
<key>CFBundleURLSchemes</key>
<array>
<string>flutterstripe</string>
</array>
</dict>
-
Android -
AndroidManifest.xml: <intent-filter android:autoVerify="true"><category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="flutterstripe" android:host="safepay" /> </intent-filter>