Hi,
I try to port my app but I get an error during ionic build. Here is me code snippet
if (Capacitor.getPlatform() == "ios")
{
this.storage.set ("iapID", p.transaction.original_transaction_id);
}
else
{
this.storage.set ("iapID", p.transaction.purchaseToken);
}
Error Message
Error: src/app/iap.service.ts:91:54 - error TS2339: Property ‘original_transaction_id’ does not exist on type ‘PlayStoreReceipt | AppStoreReceipt’.
Property ‘original_transaction_id’ does not exist on type ‘PlayStoreReceipt’.
91 this.storage.set (“iapID”, p.transaction.original_transaction_id);
~~~~~~~~~~~~~~~~~~~~~~~
Error: src/app/iap.service.ts:95:54 - error TS2339: Property ‘purchaseToken’ does not exist on type ‘PlayStoreReceipt | AppStoreReceipt’.
Property ‘purchaseToken’ does not exist on type ‘AppStoreReceipt’.
95 this.storage.set (“iapID”, p.transaction.purchaseToken);
It seems, that the type of the property transaction has changed. Any ideas how to solve this issue?