flutter_stripe icon indicating copy to clipboard operation
flutter_stripe copied to clipboard

To document urlScheme and it's iOS/Android setup

Open artemsorochan opened this issue 1 year ago • 0 comments

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?)

  1. flutter - main.dart: Stripe.urlScheme = 'flutterstripe';

  2. 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>
  1. 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>
    

artemsorochan avatar Aug 26 '24 06:08 artemsorochan