Post

Replies

Boosts

Views

Activity

"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];
4
0
3.7k
Sep ’19