Apple wallet card not working on vercel, working in local
Unanswered
Cuckoo wasp posted this in #help-forum
Cuckoo waspOP
Is there anyone who had lost a part of his life to trying to find out why vercel deployed apple card (just a ticket, not a credit card) does not work on vercel? i tried both with brave and safari, it does not work. i run it via ngrok, both work - i.e. it is not browsers. I just spent 4h with AIs trying some kind stuff with headers but nothing works. And also, for clarity, everything works on desktop browser. On mobile I get "App is trying to add card to your wallet", i press allow, and then i get error and nothing gets downloaded though the app itself shows success modal. Any help would be appreciated.
6 Replies
Cuckoo waspOP
here is the summary of my 4h of bleeding out....
Cuckoo waspOP
ok, wsated another 2h of my precious life. hereis the summary of what all AIs concluded. I would really appreciate some vercel help. i want to know who to not compress data that comes out of vercel.
Cuckoo waspOP
alright 1 more hour through and "I" f.... did it. Attached is the ai report on it. the code is not the final, but fully working . In summary, it was a combination of 3 or so errors: headers, vercel compression at cloud, and the fact that in local env the code was running from actual apple certificates and not env variables. Once I switched to vars it became apparent that that was the main culprit. I am leaving all my logs above for other juniors to know what not to do 😛 I am still not sure, as a true vibecoder :D, if what ai did is the best nextjs practice, but it works. hope that helps someone.
@Cuckoo wasp alright 1 more hour through and "I" f.... did it. Attached is the ai report on it. the code is not the final, but fully working . In summary, it was a combination of 3 or so errors: headers, vercel compression at cloud, and the fact that in local env the code was running from actual apple certificates and not env variables. Once I switched to vars it became apparent that that was the main culprit. I am leaving all my logs above for other juniors to know what not to do 😛 I am still not sure, as a true vibecoder :D, if what ai did is the best nextjs practice, but it works. hope that helps someone.
I am still not sure, as a true vibecoderusing vibe coded code in production is not a good practice. Handling payments with vibe code is even worse. And having vibe code in production for handling payments is the worst thing, that you can do. Instead: use a payment provider like molly, stripe, paypal, ... and use their backend instead of trying to handle stuff with headers and compression and all that shit.
It's NOT about the "it works" part. It's about the security, vulnability and privacy part. As a vibe coder you normally dont know what you are doing and what issues your code might have
Cuckoo waspOP
hi B, im not processing payments bud. and if you read my text carefully, I was referring in that sentence to "nextjs part" not payments.
@Cuckoo wasp hi B, im not processing payments bud. and if you read my text carefully, I was referring in that sentence to "nextjs part" not payments.
hey 0, your thread was already solved for me after [your message](https://nextjs-forum.com/post/1458655076758589471#message-1458704064597463174). As shipping vibe code to production is pretty dangerous, my message was more a general advice for vibe code (and scoped to payments). Not exactly your contenxt tbh. Even though this isn't payment processing, apple wallet passes are still security sensitive.
To be in your context: 'it works' after AI-guided trial and error will hide subtle issues especially around cert handling and platform quirks. I wouldn't ship this to production without a fully understanding of each step (even if AI explains it to you and you thnik you understood it)
To be in your context: 'it works' after AI-guided trial and error will hide subtle issues especially around cert handling and platform quirks. I wouldn't ship this to production without a fully understanding of each step (even if AI explains it to you and you thnik you understood it)