can not pay in prod env, but testflight is success

no any exception message, the pay bottomsheet is disappear after i click 'pay btn' my app is a flutter app, who can help me?

Answered by DTS Engineer in 792562022

Hi @wuhao9539,

When the Apple Pay payment sheet is presented but dismisses within a few seconds — for example, after the customer has clicked or tapped the Apple Pay button — typically one of the following issues has occurred:

  • Merchant validation failed.
  • At least one of the payment sheet event handler methods is implemented, but the equivalent completion method isn’t properly configured.

To determine if this payment sheet dismissal is due to a merchant validation failure, use Safari Web Inspector to log errors and objects when debugging merchant validation. Otherwise, please ensure the object passed to the event’s completion method is well-formed, contains valid data, and all required parameters.

For Apple Pay, each event handler has a thirty (30) second timeout. If the related completion method is not invoked within 30 seconds from the start of the event, the payment sheet will dismiss with an error. When the customer changes or updates fields on the payment sheet, their selections are shared through event handlers, allowing your website to respond to user input.

For example, for any of the customer-selected payment methods on the W3C PaymentRequest object — such as shippingaddresschange — when the browser calls one of these event handlers, you have 30 seconds to process the event and invoke the equivalent updateWith callback. Ensure any server requests to validate the shipping address occur within this 30-second period. For more information about using the W3C Payment Request API, see Setting up the payment request API to accept Apple Pay.

Important

For the onpaymentauthorized event, if your system takes longer than 30 seconds to process the payment, the customer may see the payment sheet dismiss with an error, even though you may eventually process the payment successfully.

If the payment sheet dismisses without user interaction, please confirm the following:

  • Your event handler implementations invoke the equivalent completion method. Do not stub out any of these event handler or completion methods.
  • Your event handler implementations don’t take longer than 30 seconds to execute. Check for any long-running operations in your client or server code that may prevent the completion methods from returning in a timely manner.
  • Your event handler implementations aren’t triggering an exception, breakpoint, or error, preventing the equivalent completion methods invocation.
  • The object provided to the completion handler is a well-formed and valid JSON object. Validate the structure outlined in the documentation for each event’s completion method. Additionally, ensure all required parameters are populated correctly.

Use Safari Web Inspector to identify which event handler completion method is related to an issue and then diagnose the underlying cause of the issue for that specific event, including both the event handler and completion method.

Cheers,

Paris

Hi @wuhao9539,

When the Apple Pay payment sheet is presented but dismisses within a few seconds — for example, after the customer has clicked or tapped the Apple Pay button — typically one of the following issues has occurred:

  • Merchant validation failed.
  • At least one of the payment sheet event handler methods is implemented, but the equivalent completion method isn’t properly configured.

To determine if this payment sheet dismissal is due to a merchant validation failure, use Safari Web Inspector to log errors and objects when debugging merchant validation. Otherwise, please ensure the object passed to the event’s completion method is well-formed, contains valid data, and all required parameters.

For Apple Pay, each event handler has a thirty (30) second timeout. If the related completion method is not invoked within 30 seconds from the start of the event, the payment sheet will dismiss with an error. When the customer changes or updates fields on the payment sheet, their selections are shared through event handlers, allowing your website to respond to user input.

For example, for any of the customer-selected payment methods on the W3C PaymentRequest object — such as shippingaddresschange — when the browser calls one of these event handlers, you have 30 seconds to process the event and invoke the equivalent updateWith callback. Ensure any server requests to validate the shipping address occur within this 30-second period. For more information about using the W3C Payment Request API, see Setting up the payment request API to accept Apple Pay.

Important

For the onpaymentauthorized event, if your system takes longer than 30 seconds to process the payment, the customer may see the payment sheet dismiss with an error, even though you may eventually process the payment successfully.

If the payment sheet dismisses without user interaction, please confirm the following:

  • Your event handler implementations invoke the equivalent completion method. Do not stub out any of these event handler or completion methods.
  • Your event handler implementations don’t take longer than 30 seconds to execute. Check for any long-running operations in your client or server code that may prevent the completion methods from returning in a timely manner.
  • Your event handler implementations aren’t triggering an exception, breakpoint, or error, preventing the equivalent completion methods invocation.
  • The object provided to the completion handler is a well-formed and valid JSON object. Validate the structure outlined in the documentation for each event’s completion method. Additionally, ensure all required parameters are populated correctly.

Use Safari Web Inspector to identify which event handler completion method is related to an issue and then diagnose the underlying cause of the issue for that specific event, including both the event handler and completion method.

Cheers,

Paris

can not pay in prod env, but testflight is success
 
 
Q