flutter-stripe / flutter_stripe

Flutter SDK for Stripe.
https://pub.dev/packages/flutter_stripe
961 stars 531 forks source link

Description is not shown on apple pay sheet #1832

Closed ryohetoy closed 4 months ago

ryohetoy commented 5 months ago

Describe the bug Description field in PaymentRequestType.recurring is not shown on apple pay sheet. There is no way to show the description on apple pay sheet by using stripe flutter.

To Reproduce Use this code.

const params = PlatformPayConfirmParams.applePay(
  applePay: ApplePayParams(
    request: PaymentRequestType.recurring(
      // NOTE: this description is not shown anywhere on apple pay sheet.
      description: 'this is description',
      managementUrl: 'https://example.com',
      billing: RecurringCartSummaryItem(
        label: 'this is label',
        amount: '1000',
        intervalUnit: ApplePayIntervalUnit.month,
        intervalCount: 1,
      ),
    ),
    merchantCountryCode: 'JP',
    currencyCode: 'jpy',
    cartItems: [
      ApplePayCartSummaryItem.recurring(
        label: 'this is label',
        amount: '1000',
        intervalUnit: ApplePayIntervalUnit.month,
        intervalCount: 1,
      )
    ],
  ),
);

await Stripe.instance.confirmPlatformPaySetupIntent(
  clientSecret: 'secret',
  confirmParams: params,
);

Expected behavior Show description on apple pay sheet.

ryohetoy commented 5 months ago

Sorry to rush you, but this is urgent for anyone developing iOS app through flutter. Because Apple asks us to show description on apple pay sheet for review. Apple never accept the review of app unless this bug is fixed.

This is what apple said to me.

Guideline 4.9 - Design - Apple Pay

The app uses Apple Pay to offer recurring payments but does not provide the necessary information to the user prior to the sale of goods or services.

Specifically, the app does not include the following:

- the fact that it will continue until canceled
- What will be provided to the user during each period
- How to cancel
jonasbark commented 4 months ago

The value is set correctly as part of the paymentDescription of the PKRecurringPaymentRequest. It seems like Apple decided not to show it for some reason.

My recommendation is to adjust the label from RecurringCartSummaryItem instead.