Unable to add test card for apple pay testing
Asked Answered
A

5

8

I am working to integrate Apple pay in my application to test it. I assume, I need to have some test card added in my wallet app . Without this I am getting an error in Xcode that reads "This device cannot make payments."

I have done all the setup related to Xcode, and under capability I can see my merchant id selected and all 3 checkmarks done.

So I tried adding test card for apple pay testing (getting the token) I followed the process as setting -> wallet and apple pay -> add credit/debit card -> enter manually -> Here I have given fake credentials taken from apple

testcards from apple site FPAN: 5204 2477 5000 1497 Expiration Date: 11/2022 CVC: 111

But none of the cards are accepted, for MASTERCARDS I get error like, issuer doesn't yet offer support for this card. Likewise errors for visa test cards I get.

So how am I suppose to test apple pay integration without having to add the cards in apple pay setup or how can I add a test card successfully so that I get the token.

EDIT: I was able to successfully see the apple pay presentation screen, as simulated cards are allready added in it by default.

I am looking for the same with real device.

Edit - [Accepted answer(mine) to this thread is taken back, because from the recent answers and comments it seems, test credentials are accepted with Apple pay now, I will evaluate some recent answer to check their validity to accept new answer ]

Airframe answered 28/7, 2016 at 10:43 Comment(0)
A
7

Hi I have just got this answer from support

It’s not possible to add a test credit card number (even Braintree’s test cards) into Apple’s Passbook. So any credit card you wanted to add into Passbook even for testing purposes would need to be real.

updating it so that user should not be confused when they work with apple pay.

Airframe answered 28/7, 2016 at 12:50 Comment(4)
Are the payment going through when testing with a real credit card ?Basildon
card won't be charged, it only simulatesContrapositive
This should not be the accepted answer. When setting up to test Apple Pay, you create two merchant IDs. One is for testing. The other is for production. You also have to create a sandbox user. When you test, you must use a physical device and log in to iCloud using the sandbox user. Only then will you be able to add test cards from the list of test cards. A token will be generated if the app is run on a real device capable of processing Apple Pay. A token is not generated when using the simulator. For testing, encode the test merchant ID with the request.Sleeping
Hi, when this was written adding test cards to passwook was not working, seem like all has changed recently. So I am removing the accepted answer add your answer with facts and screenshot I ll evaluate and acceptAirframe
G
4

Using these Card Details I was able to add Card to Wallet App

CARD Number: 5204 2477 5000 1505
Expiration Date: 11/2022
CVC: 111

Source

Gamekeeper answered 9/10, 2019 at 10:58 Comment(3)
doesnt work for me..did you add the card directly to the wallet without any sandbox tester account or did you set a sandbox test account?Gama
I have added a Sandbox test accountGamekeeper
I tried the card number with a new date (09/2024) and it was added to my Apple tester accountFertilizer
E
3

You need to setup a sandbox test account and then add cards to wallet using the data provided on apples website. You cannot just use that data when you signin into your device using regular Apple Id.

Esparza answered 30/1, 2019 at 21:44 Comment(0)
B
3

Make sure you are adding the test card in settings > wallet & apple pay (scroll down) and not in the apple id, icloud, itunes & appstore section at the top of settings

Brodeur answered 27/2, 2020 at 18:43 Comment(0)
S
1

Make sure:

  1. Apple account is Sandbox: Make sure you're using a Sandbox Tester account. Being a TestAccount is different from being a Sandbox Tester. Login to iPhone with a Sandbox tester account. Your logged-in account should be here: https://appstoreconnect.apple.com/access/users/sandbox

  2. Verify iPhone Settings > General > Language & Region > Region > is where Apple Pay is supported. eg: USA

  3. Real iPhone device.

  4. Try adding card from https://developer.apple.com/apple-pay/sandbox-testing/

Shantell answered 7/9, 2023 at 13:14 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.