flutter-plugin icon indicating copy to clipboard operation
flutter-plugin copied to clipboard

Critical Issue: PlatformException in PAY Plugin - Apple Pay Checkout Failing

Open Diyasrisha opened this issue 1 year ago • 7 comments

Hi

I hope this message finds you well. I’m writing to report a critical issue we're experiencing with the PAY plugin during the Apple Pay checkout process on our mobile app.

Issue Summary:

We are encountering a PlatformException when attempting to present the Apple Pay payment controller, which is preventing users from completing their transactions. This error occurs consistently during the payment flow and is affecting the user experience.

The error message displayed is as follows:

PlatformException(paymentError, Failed to present payment controller, null, null)

Additional Information: Platform: iPad (iOS) PAY Plugin Version: 2.0.0 Environment: Live environment (affecting real users)

Impact: This is a critical issue as it directly affects the ability of users to complete purchases through Apple Pay, which may result in a loss of sales and negatively impact the user experience. Given the high usage of Apple Pay, we believe this issue should be addressed with priority.

Attachments: Attached is a screenshot that provides further context, showcasing the error message and the checkout screen with Apple Pay selected

Request: Please investigate this issue at your earliest convenience and provide guidance on how we can resolve this. If any further information or debugging logs are required from our end, do let us know, and we will be happy to assist.

I appreciate your prompt attention to this matter and look forward to your feedback.

Best regards, Dhivya

Screenshot-0917-071654 (2)

Diyasrisha avatar Oct 04 '24 09:10 Diyasrisha

Hello Team, have you resolved this issue or find any workaround to solve it ?

sagarZodage avatar Apr 04 '25 08:04 sagarZodage

Hi Dhivya, thanks for filing the case up. Can you share an excerpt of the configuration you are using (redacting any private values from your JSON config)?

Also, as a side note, consider processing exceptions programmatically and choosing an intelligible error message that you show to your users as a result (instead of showing the exception in your user interface), to avoid disclosing any internals about your business logic.

JlUgia avatar Apr 18 '25 10:04 JlUgia

We are facing same issue, it happens once in ~200 ish calls we are not sure why, if payment fails and we try again with same parameters it works fine.

Is there any definitive way to reproduce this?

dimiltagline avatar May 09 '25 07:05 dimiltagline

Are you still facing this issue @dimiltagline @sagarZodage @MohamedEzzDM @Diyasrisha ? If so, are you able to share a redacted version of your payment configuration JSON that we can use to troubleshoot the problem?

JlUgia avatar Jul 29 '25 16:07 JlUgia

Dear @JlUgia, The issue is still happening randomly — my Sentry has detected several occurrences. Please find below the payment configuration I’m using:

{
  "provider": "apple_pay",
  "data": {
    "merchantIdentifier": "YOUR_MERCHANT_ID",
    "displayName": "John Doe",
    "merchantCapabilities": ["3DS", "debit", "credit"],
    "supportedNetworks": ["visa", "mada", "amex", "discover", "masterCard"],
    "countryCode": "SA",
    "currencyCode": "SAR",
    "requiredBillingContactFields": [],
    "requiredShippingContactFields": [],
    "shippingMethods": [
      {
        "amount": 50.0,
        "detail": "Available within an hour",
        "identifier": "in_store_pickup",
        "label": "In-Store Pickup"
      }
    ]
  }
}

Firas-Amin avatar Aug 21 '25 07:08 Firas-Amin

I solve this issue by writing iOS native code and I use flutter platform channel i recommend applying this solution

mohammed-alfard avatar Sep 22 '25 22:09 mohammed-alfard

Do you have any solution so far?

@mohammed-alfard Can you elaborate on what the problem was and how you were able to fix it?

aggeloskoutanis avatar Oct 06 '25 07:10 aggeloskoutanis