Apple Pay Sandbox test cards with Payment Not Completed

Testing apple pay in our app is not working in the sandbox environment. When using a test card - the response returns with "Payment not completed". We've tested with these cards:


Discover: 6011 0009 9446 2780

11/2022


Visa: 4761 1200 1000 0492

11/2022


The code works fine in production but we'd like to have a sandbox environment for further testing. Has anyone encountered this?

This page https://developer.apple.com/apple-pay/sandbox-testing/ doesn't list macOS, does it means sandbox testing of Apple pay web doesn't support macOS at all?

Hi, @meaton, I got some log informations like this, could tell me the reason why I got Payment Not completed when I pay with my touch ID. Much thanks!!!

2022-01-11 19:53:59.975410+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitUIFoundation) [com.apple.passkit:Payment] PKAuthenticator (0x60000102af00): creating evaluation.
2022-01-11 19:54:04.135641+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Time profile: TouchID Match: 0.471166 seconds
2022-01-11 19:54:04.356646+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitUI) [com.apple.passkit:Payment] Authentication successful.
2022-01-11 19:54:04.356744+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStateAuthenticate to PKPaymentAuthorizationStateNonce with param: <private>
2022-01-11 19:54:04.357035+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStateNonce to PKPaymentAuthorizationStateAuthorize with param: <private>
2022-01-11 19:54:04.357100+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Starting In-App Payment Session...
2022-01-11 19:54:04.950729+0800 0x378ed    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Time profile: In-App Payment Session Start: 0.593576 seconds
2022-01-11 19:54:04.950765+0800 0x378ed    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Session Started
2022-01-11 19:54:04.950854+0800 0x378ed    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Authorizing Payment Request: <private> for Payment Application <private> (Applet: <private>) with nonce: <private>
2022-01-11 19:54:05.564589+0800 0x378ed    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Invalidating PKInAppPaymentSession
2022-01-11 19:54:05.564782+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStateAuthorize to PKPaymentAuthorizationStateRewrap with param: <private>
2022-01-11 19:54:05.565062+0800 0x37704    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] PKSecureElement: Requested to start session with type: 0
2022-01-11 19:54:05.565127+0800 0x37704    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] PKSecureElement: Starting session with type: 0
2022-01-11 19:54:06.155320+0800 0x37704    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] PKSecureElement: secure element manager session (type: 0) started.
2022-01-11 19:54:06.155705+0800 0x37704    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] -[PKSecureElement signedPlatformDataWithCompletion:]_block_invoke Failed to retrieve platform data: <private> error: Error Domain=nfcd Code=14 UserInfo={NSLocalizedDescription=<private>}
2022-01-11 19:54:06.155830+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Rewrap data not available
2022-01-11 19:54:06.155980+0800 0x378ed    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] PKSecureElement: secure element manager session (type: 0) ended.
2022-01-11 19:54:06.191013+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Performing request:
POST <private>
<private>
<private>
2022-01-11 19:54:07.156648+0800 0x37704    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Response:
<private> 500
<private>
<private>
2022-01-11 19:54:07.157098+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStateRewrap to PKPaymentAuthorizationStateError with param: <private>
2022-01-11 19:54:07.157161+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitUIFoundation) [com.apple.passkit:Payment] PKAuthenticator (0x60000102af00): Invalidating context.
2022-01-11 19:54:08.455833+0800 0x376da    Default     0x0                  26393  0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStateError to PKPaymentAuthorizationStateAuthenticate with param: <none>
Apple Pay Sandbox test cards with Payment Not Completed
 
 
Q