-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing backoffice validation support #11
Comments
I am not very familiar myself with receipt validation and I won't be able to help on this one unfortunately. @phimage may have a bit more insight as he implemented the feature in this project. |
Sorry, I don't know what @fbartolom talk about (need better explanation...) all information about receipt validation |
In fact I know that post you are referring to. But as you may also see, it just speaks of validating the purchase locally or on the AppStore, yet always from the app. In my case I need to validate the certificate from the backoffice in order to update a DB field in the case the purchase is correct. Unfortunately I found no solution for sending the receipt created by the appStoreReceiptURL to the backoffice in order for it to submit it to the Appstore for its due confirmation. |
@fbartolom I was able to accomplish this by doing something similar to the below. Essentially once the SwiftyStoreKit.purchaseProduct completes with a 'Success' result, the receipt data should be stored in NSBundle.mainBundle().appStoreReceiptURL. You can then send this to along to your server for validation.
|
What about situation, when backend not responding? We need call paymentQueue.finishTransaction manually, when backend respond succeed. How do this with SwiftyStoreKit? |
Further to @AlekseyKolosovskiy comment, SwifyStoreKit's approach to purchasing doesn't comply with best practice; it calls |
Swift 2.2 I'm having this problem with an auto renewing subscription. When a purchase is a success, it calls verify receipt, and at this point I can check with a remote server who checks the receipt with Apple's servers. First I call purchaseProduct. On success I call verifyReceipt, but the call back that calls verifyReceipt is fired before the purchase is complete, and then doesn't fire sometimes when the user completes the purchase with Apple. I have found it intermittent. Sometimes firing a second time on purchase completion, and sometimes not.
|
Since this issue was originally opened I have added non-atomic transactions to SwiftyStoreKit, and local receipt verification is being tracked here: #101. I'm going to close this issue for now. I would advise everyone to update to the latest version, and open new issues if you experience any problems. |
Albeit a very appreciated attempt at porting storekit functionaliies to Swift, the solution misses the possibility of validating the purchase remotely in cases when a certain oepration on the backoffice is subjected to the correct processing of the purchase and to prevent fraud. This functionality is missing from all solutions I found using appStoreReceiptUrl while is present in the original MKStoreKit using the deprecated old construct. I know by myself the issue is a very tough one having attempt myself to implement it for a month three years ago, but I am baffled no one suceeded since then.
The text was updated successfully, but these errors were encountered: