I got apple pay set up on my app, and everything was working great when I tested locally. I was able to put through real payments on a real device. Then, I pushed to the app store and it's no longer working.
I was able to repro locally by doing the "release" build instead of a debug build, and I get the following error:
apple pay error This device can make payments but has no supported cards
This is on the same same phone that works fine with a debug build. So, I'm assuming this is just a bad error message. I'm pretty certain it has something to do with the debug vs release cert, but I can't find anywhere that those are set independently.
Additional notes:
I figured it out. I have NO IDEA where (or if) this is in the Xcode ui, but in the root of the project there are 2 files Entitlements-Debug.plist and Entitlements-Release.plist.
The following appeared in the debug one, but not the release:
<key>com.apple.developer.in-app-payments</key>
<array>
<string>merchant.myapp-here.com</string>
</array>
Feels like this is something Xcode should do automatically, but copying these lines to the release plist fixed the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With