Alphanumeric transaction identifier and empty in_app array causes verification delays

Hi,

The part of our application is a finance game which is simple portfolio evaluation with real time market prices .We are selling consumable product for to improve user game scores in our application. That's why any delay in purchasing process creates serious disadvantage in user status.

We have server-side validation based on client delivered receipt. The server-side validation fails when in_app array is empty in receipt and throws validation error. After Server returns Validation Error, client refresh receipt request with SKReceiptRefreshRequest and sends for server validation again. The case happens couple of times until server validation approved. The approved state has purchased product info in_app array. Also some of these cases we observe alphanumeric transactionIdentifier (transactionId) and for a while the transactionId replace with proper transactionId. Such as "75E75A0D-57A8-XXXX-XXXX-99949F0A61E5" became 6000XXXX480047 after new validation attempts of client.


Our questions are Why the receipt retrieved after SKPaymentTransactionStatePurchased transaction state can contains an empty in_app array rather than the expected products. And what is the meaning of alphanumeric transactional identifier.

How should we apply avoid to multiple server validation and Is there any suggested best practice exists about final receipt delivery to server to avoid server rejection? How should we check and be sure in_app array not empty in client? How can we speed up the flow.

The receipt's in_app_purchase array will be empty if the product is a consumable and the device has called finishTransaction.


You get a new receipt on the device (with in_app_purchase array filled in with latest purchase) after StoreKit calls updatedTransactions.


You might want to explore the app "Beat The Stock Market".


But..."That's why any delay in purchasing process creates serious disadvantage in user status." - there is at most a few second delay in any purchase and the call to updatedTransactions.

You mentioned the general behavior. But that's not my question.

When updatedTransactions method returns SKPaymentTransactionStatePurchased statate, we send the receipt to the server for validation. As I said, in some rare cases, server returns validation error because of empty in_app_purchase. In this case, the client downloads the receipt again with SKReceiptRefreshRequest and sends it to server again for validation. In this way, after the 2nd and 3rd trials, we can experience situations where the product comes to the in_app_purchase array and receipt can be validated.



Apart from that, as I said again, we can get strange alphanumeric transactionId's. We got validation error from our server when transactionId is alphanumeric. But for example when the user restarts the application, updatedTransactions returns SKPaymentTransactionStatePurchased on app start and we get proper formatted transactionId. After we try validation, we get success now. This is another rare situation that we don't know the reason.



We need to clearly understand the reasons of these situations in order to respond to the user correctly and to provide better service.


Thanks..

>When updatedTransactions method returns SKPaymentTransactionStatePurchased statate, we send the receipt to the server for validation.


Please clarify that you decode that receipt and don't rely on the Apple's 'latest_receipt_info' field which may lag in time behind the current receipt. If so, check your code to be sure you actually retrieve the new receipt in updatedTransactions.


>server returns validation error because of empty in_app_purchase

Can you please explain why the 'server returns validation error' rather than the server returning the decoded receipt which may or may not contain an in_app_purchase field. What error?


>we can get strange alphanumeric transactionId's

That sounds like a hack attempt by the user

I responded to the issue of the empty in_app array in the developer forum posting <https://forums.developer.apple.com/thread/133818> This is a bug report issue.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Alphanumeric transaction identifier and empty in_app array causes verification delays
 
 
Q