There is one significant regression in the in_app_purchase 0.6.0
In 0.5.2, PurchaseDetails contained the billingClientPurchase field with additional Android related information.
The billingClientPurchase contained one very important piece of information: signature.
This signature is required to locally verify a purchase. In 0.6.0, one can only find PurchaseDetails.verificationData.localVerificationData (another important piece of data), but no signature can be received.
Please could you add the signature as well?
Future<bool> _verifyPurchase(PurchaseDetails purchaseDetails) async
{
if (Platform.isAndroid) {
try {
final body = json.encode({
'signature': purchaseDetails.billingClientPurchase.signature, // Compile error
'receipt': purchaseDetails.verificationData.localVerificationData,
})
await http.post(RECEIPT_VERIFICATION_ENDPOINT_FOR_ANDROID, body: body);
purchaseDetails.billingClientPurchase.isAutoRenewing; // Compile error
} catch (e) {
return false;
}
}
return true;
}