I’m using InAppPurchase and everything looks fine, after some initial changes.
On the device console, an error appears:
{“code”: - 2, “message”: “Unable to initialize billing”, “errorCode”: - 2}
This is because the plugin does not receive the play_store_key property. I used to set this property in the /src/mainfest.json file in Ionic 3.
I tried to solve the problem with the before_prepare hook, but in the capacitor it does not recognize the www path. The error it throws is the following:
2021-01-04 13:49:23.578 D/google.payments: Unable to read manifest file:java.io.FileNotFoundException: www/manifest.json
2021-01-04 13:49:23.578 D/google.payments: Unable to read manifest file:java.io.FileNotFoundException: www/manifest.json
2021-01-04 13:49:23.578 D/google.payments: Unable to initialize billing
2021-01-04 13:49:23.578 D/google.payments: executing on android
2021-01-04 13:49:23.578 D/google.payments: Error: Billing cannot be initialized