Open selcukbeyhan opened 9 months ago
@selcukbeyhan If you don't need to validate the receipt on App Load, you can set the need needAppReceipt
option to false
. If you have subscriptions and you need to validate the receipt to ensure it is not expired, receipt validation on page load is key.
In my case the receipt validation is only triggered when a purchase is made and I let my server handle the rest
await store.initialize([
{
platform: Platform.APPLE_APPSTORE,
options: { needAppReceipt: false },
},
]);
@selcukbeyhan If you don't need to validate the receipt on App Load, you can set the need
needAppReceipt
option tofalse
. If you have subscriptions and you need to validate the receipt to ensure it is not expired, receipt validation on page load is key.In my case the receipt validation is only triggered when a purchase is made and I let my server handle the rest
await store.initialize([ { platform: Platform.APPLE_APPSTORE, options: { needAppReceipt: false }, }, ]);
Thanksa. lot for the suggestion. I didnt see that flag. However, do you have any documentation about this server side validation logic? Like an interface contract: what is called when and what values to return, etc.
I saw that for the validation of receipts, there are some options available: Function or Server/Backend. However, there is no documentation about the specification of the expected validator. Otherwise, the plugin tries to verify the receipt various times.
I am running my plugin in DEBUG log level and see my log console is full of messages like this below: ..... ..... ⚡️ [log] - [CdvPurchase.Validator] DEBUG: Validation requests=101 responses=199 ⚡️ [log] - [CdvPurchase] DEBUG: Calling callback: type=receiptUpdated() name=#6417eca207b1ced3763b9bb798bdbc49 reason=adapterListener_receiptsUpdated ⚡️ [log] - LIFEPLANNER Receipt is updated ⚡️ [log] - [CdvPurchase] INFO: verify(Receipt) ⚡️ [log] - [CdvPurchase.Validator] DEBUG: Schedule validation: {"className":"Receipt","transactions":[{"className":"Transaction","transactionId":"appstore.application","state":"finished","products" ..... .....
Reminder of relevant code section: