"Payment not completed" with test cards

I'm seeing "Payment not completed" with test cards many times, for unknown reason. Code is fine.

I'm gueesting there is some blocking mechanism, on apple id level.


These days I've followed Apple Pay Sandbox Testing document to create two test accounts, both App Store Territory are United States. I am in China and sometimes I may use VPN of US IP.

I created a simple test app to test apple pay, the code is pasted at the end of this post. I used this code to test these two accounts, sometimes it worked, suddently it stopped working and always "Payment not completed", no matter what test card I add.


I tried to find the pattern, unforturnatelly I couldn't, for example:

Yesterday I added a new test account (say Account A) on a test device (say Device A), added a VISA test card, it worked, and then I added three more: Master/Discover/American Express, and test again, suddenly "Payment not completed". I tried sign out and sign in and add test card again, still not working. Today I check again, still not working.

There's another test account (Accout B) working on another test device (Device B), running same test app. So I sign in with Account B on Device A, add same test card, then worked. Note, this didn't mean Account B is perfect, it used to having issue, but now working, maybe just because I haven't used it for hours.


Code:

PKPaymentRequest *paymentRequest = [[PKPaymentRequest alloc] init];

paymentRequest.merchantIdentifier = @"merchant.com.samuel.applepay.test";

paymentRequest.countryCode = @"US";

paymentRequest.currencyCode = @"USD";

paymentRequest.merchantCapabilities = PKMerchantCapability3DS;

paymentRequest.supportedNetworks = @[PKPaymentNetworkAmex, PKPaymentNetworkVisa, PKPaymentNetworkDiscover, PKPaymentNetworkMasterCard];

One more test I did just now:

Device A & B both are logged in with same test account, added one same test VISA card (the one ends with 0492), having same test app working without "Payment not completed" error.

I added one test MasterCard card (the one ends with 1471) into Device A, suddenly using the test app shows "Payment not completed" for both cards! I removed test MasterCard and tried the test VISA card, still not working! Fortunatelly it doesn't affect Device B.

This makes me crazy, the "Payment not completed" error happens so often, and no any explaination, also we aren't able to catch any delegate callback for this error.


BTW, device A is iPhone 6s Plus 12.3.1, B is iPhone 6s 12.2.

have you solved this issue, I sucked this issue too.

Any solution from one of you? also stuck in that situation

This appears to still be a problem on Mac Books in 2023.

Any way past this, @matteaton?

"Payment not completed" with test cards
 
 
Q