Apple Pay Sandbox with Payment Not Completed

Team,

When I try using Apple pay for Japan, we are getting Payment Not Completed error for a merchant with Japanese character as the displayName at completeMerchantValidation.

The same works well if the merchant has name in English.

log from com.apple.passkit as explained in Apple Pay on the Web Debugging Guide

2024-04-30 12:12:21.441231+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Received <private> status: PKPaymentAuthorizationStatusSuccess
2024-04-30 12:12:21.441336+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Evaluating merchant session using PROD trust policy.
2024-04-30 12:12:21.448371+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStateClientCallback to PKPaymentAuthorizationStatePrepareTransactionDetails with param: <private>
2024-04-30 12:12:21.448393+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] State change: PKPaymentAuthorizationStatePrepareTransactionDetails
2024-04-30 12:12:21.448444+0530 0xb6bd16   Error       0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] State change not implemented: PKPaymentAuthorizationStatePrepareTransactionDetails
2024-04-30 12:12:21.450878+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Performing request:
POST <private>
{
	7 <private> fields
}

500 bytes
2024-04-30 12:12:22.642216+0530 0xbaa237   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Task Completed: <private>
2024-04-30 12:12:22.642348+0530 0xbaa237   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Response:
<private> 400 Time profile: 1.19145 seconds
{
	6 <private> fields
}

232 bytes
2024-04-30 12:12:22.642571+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStatePrepareTransactionDetails to PKPaymentAuthorizationStateFatalError with param: <private>
2024-04-30 12:12:22.642617+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] State change: PKPaymentAuthorizationStateFatalError
2024-04-30 12:12:22.642757+0530 0xb6bd16   Error       0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] Payment failed with fatal error <private>
2024-04-30 12:12:22.643288+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Analytics] subject: inApp event: <private>
2024-04-30 12:12:22.659154+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] glyphView - revealedErrorAction()
2024-04-30 12:12:24.633308+0530 0xb6bad7   Default     0x0                  55529  0    Safari: (PassKitMacHelperTemp) [com.apple.passkit:Payment] Invalidate extension <private> identifier <private>
2024-04-30 12:12:24.653014+0530 0xb6bd16   Info        0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Connections] PKInAppPaymentService:0x12bf1b660 (0x1290e2a80): Tearing down existing connection
2024-04-30 12:12:24.653173+0530 0xbaaa12   Info        0x0                  68603  0    passd: [com.apple.passkit:Connections] PDXPCServiceListener 2 (0x127705150:55547): connection invalidated
2024-04-30 12:12:24.654891+0530 0xb6bd16   Default     0x0                  55547  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Analytics] subject: inApp event: <private>


As we can see, com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitMacHelper) [com.apple.passkit:PaymentUI] Payment failed with fatal error <private>, how do we debug this further?

Replies

Please report a bug on bugs.webkit.org.

I read the document again,

A string of 64 or fewer UTF-8 characters containing the canonical name for your store, suitable for display. This needs to remain a consistent value for the store and shouldn’t contain dynamic values such as incrementing order numbers. Don’t localize the name. Use only characters from the supported character sets in the fonts listed in the table below.

ref : Request Parameters

how we are invoking the completeMerchantValidation()

    session.completeMerchantValidation({
      displayName: 'じゃ', //utf-8 string
      //... other params from the docs
    })

Can you please help to understand if it adheres to use canonical name. don't localize..
Note: if the displayName is in english, it works.