Skip to content

Commit

Permalink
Merge branch 'main' into sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbark authored Nov 26, 2023
2 parents 8016cc3 + 36b95bd commit dd436c3
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions docs/sheet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void main() async {

Use your [test mode](https://stripe.com/docs/keys#obtain-api-keys) keys while you test and develop, and your [live mode](https://stripe.com/docs/keys#test-live-modes) keys when you publish your app.

## 2. Add an enpoint [Server Side]
## 2. Add an endpoint [Server Side]

First, you need a Stripe account. [Register now](https://dashboard.stripe.com/register).

Expand Down Expand Up @@ -100,11 +100,14 @@ Future<void> initPaymentSheet() async {
customerEphemeralKeySecret: data['ephemeralKey'],
customerId: data['customer'],
// Extra options
testEnv: true,
applePay: true,
googlePay: true,
applePay: const PaymentSheetApplePay(
merchantCountryCode: 'US',
),
googlePay: const PaymentSheetGooglePay(
merchantCountryCode: 'US',
testEnv: true,
),
style: ThemeMode.dark,
merchantCountryCode: 'DE',
),
);
setState(() {
Expand Down Expand Up @@ -189,7 +192,7 @@ Make sure to set your Apple merchant ID `Stripe.merchantIdentifier` when you ini
```


then add `applePay: PaymentSheetApplePay()` with your and the country code of your business.
then add `applePay: PaymentSheetApplePay()` with the country code of your business.

```dart
Stripe.instance.initPaymentSheet(
Expand Down Expand Up @@ -234,15 +237,17 @@ For more details, see Google Pay’s Set up Google Pay API for Android.

#### Add Google Pay

To add Google Pay to your integration, set `googlePay: true` with your Google Pay environment (production or test) and the country code of your business.
To add Google Pay to your integration, set `googlePay: PaymentSheetGooglePay()` and specify the country code of your business within that.

```dart
Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
merchantDisplayName: 'Flutter Stripe Store Demo',
//...
testEnv: true,
merchantCountryCode: "US",
googlePay: const PaymentSheetGooglePay(
merchantCountryCode: 'US',
testEnv: true,
),
),
);
```
Expand Down

0 comments on commit dd436c3

Please sign in to comment.