I have done the Apple Pay integration https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay_requirements and tested https://developer.apple.com/apple-pay/sandbox-testing/.
I have done the testing successfully by using sandbox and real cards but cannot see the transaction history for any of them. There is no record on Card Issuer Bank statement.
I've followed the following guidelines to check transaction recordshttps://support.apple.com/en-gb/guide/iphone/iph7b666943a/ios but couldn't see any change?
Has anyone done this yet? if yes, then please guide me through the process to check the transaction history record of payments made by Apple Pay iOS app and where can developer(retailer/owner of the app) can see the transactions done by user?
Related
i have implemented apple pay in my flutter application and when i tapped on the apple pay button its working and i'm recieving transaction id and some other details.Im running this on sandbox test environment. But the problem is that i can't see any records of the payment. How can i find the payment records.
Actually I have implemented auto-renewable subscription feature using In-App Purchase on my project.
It throws payment cancelled when I try adding card whilst subscribing. If card is already added, it is working fine.
But App store shows subscription and payment done.
I have used SwiftyStoreKit library which is no longer maintained from May 1.
I have tested all in production mode by downloading app from app store.
Is there any way to test it while development? In sandbox mode, there is no option to test by adding card or paypal.
No,
there is no option to test it while in development. It might be possible to simulate the exact same scenario, but with "parental permissions" - create IAP product that requires parental permissions, and make sure your account is "child" or "limited" - it should have similar flow like expired credit card. Although I have not tested it, but worth a shot.
what happens is that if you add new transaction to the transaction queue, and credit card has expired, you will get "transaction failed" in your queue. If user then fills out the correct credit card, you will get "transaction succeeded" message.
https://forums.developer.apple.com/thread/6431
here you can read more about credit card expiration.
So I followed the official manual and implemented this:
https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW1
user pays in app
app gets receipt info from Apple
this receipt info is sent to my server
my server verified receipt by calling Apple API and activates membership for client
The obvious problem is that 3. can fail. I have clients complaining they paid, they are sending me SS of the amount being deducted, but my server was never notified. And I have no way to find these users. Is there some CP where I can search by customer e-mail or transaction ID to check if this is Photoshopped screenshot or valid one?
Is there some API that can be called to list transactions by product and e-mail of client?
https://appstoreconnect.apple.com/ - Apple CP is useless for this
There is no method to correlate the customers details with your transaction details. Only Apple can do this.
My first suspicion is that you may have a logic problem in your purchasing process. If implemented correctly, a transient failure at step 3 doesn't matter.
You should:
Create your transaction queue observer a soon as your app starts. This will enable any pending transactions to be delivered to your observer
When you get a purchase transaction in your observer you verify with your server
Only once you have a response from your server that the purchase has been recorded successfully do you call finishTransaction.
This way if something goes wrong with your server or the app crashes the transaction is still pending in the queue.
If you are using auto-renewing and/or non-consumable IAP then I
strongly suggest you provide a "restore purchases" button in your
UI. This makes it simple for the user if something goes wrong or when
they move to a new device.
If you have users who claim that they did not get what they paid for then you can refer them to Apple App Store support who can refund the transaction.
If step three fails you can fall back to local verification and then let the user through for this session (or some number of sessions before you require it to succeed). Unfortunately local authentication is a pain in the ass because the receipt is encrypted. See this link for an example: https://github.com/andrewcbancroft/SwiftyLocalReceiptValidator . You can also report failures of step 3 to your analytics tool so you can see who is actually affected by this issue (obviously this only works if the analytic eventually get an internet connection.
I am testing my In-App Purchase code. I am presented with the following dialogue in the Xcode console:
Transaction is initiated:
About to fetch the products
Checks if user can make payments:
User can make purchases and will fetch products from Apple Store now
Product(s) exist and are retrieved from Apple servers ...
Full Access To xxxxxx xxxxx xxxx (my product description)
Sending the Payment Request to Apple
Received Payment Transaction Response from Apple
And transaction is stuck here. NO response from Apple servers received.
I have read a lot of content that states sandbox accounts testing is often riddled with bugs.
Is this one of them?
I have played around a lot with sandbox testing accounts and have never been presented with this particular situation.
Is anyone able to shed any light on the situation for me?
Thank you in advance.
My IAP code works now on my test device.
What I did was:
Perform a soft reset of my device; and
Completed some app updates that had not completed under my 'normal' Apple ID.
The combination of the two steps resolved my inability to receive a Payment Transaction Response.
I would like to capture the NFC payment details in an app and was hoping this would be available if the NFC payment was launched from my app. I just need to know the amount paid, and merchant.
Going through Apple's docs, all I can see is software implementations of the Apple Pay with Touch ID, I can't see any references to integrate the Apple Pay NFC.
This is not possible as Apple's implementation is meant to conceal this data. That's the reason you can't find anything in their docs about it. Apple Pay via NFC is initiated by the contactless payment terminal and not "launched from [your] app". The data like the tokenized Primary Account Number (PAN), Cardholder Name, Expiration date, etc is sent from the Apple device to the payment terminal and up to the cloud via the merchant's infrastructure. Check page 19 of the EMV Overview Guide to get an idea. The Apple device unlocks the data from the Secure Element (after TouchID access granted) and shuttles it over NFC and most likely won't ever expose these details to the App layer. The approach runs inline with their statement "Keep your purchases private." If the transaction is approved the payment terminal will send a Transaction Certificate (TC) over the NFC link to alert the Apple device the payment was successful. No amount paid or merchant name is sent over with the TC according to the spec. It might also be worth reading this post to better understand how the Apple devices only act as contactless cards and not readers.
The best way to get involved with the customer transaction is offering an InApp payment experience at the store. Whether it be through iBeacons or geolocation, launching the retail app in context can allow customers to purchase through Apple Pay InApp rather than NFC. This provides you more opportunity to get the merchant and transaction amount since your app is in control vs the NFC stack. It's tricky to cover the checkout workflow but doable.
I hope this info is useful and guides you to some other options to get what you need done.