Closed Afrykakod123 closed 7 months ago
It's working fine, I created the VerifiedPurchase object myself, and it's working. Please delete or close it.
Could you share an example of how you construct these object successfully for ok: true
and ok: false
cases?
I create a callback when prepaid subscription
false - callback({ ok: false });
true
const collectionPurchase: VerifiedPurchase = {
id: JSON.parse(product.transaction.receipt).productId, expiryDate: new Date(resData.lineItems[0].expiryTime).getTime(),
isBillingRetryPeriod: false, isExpired: false, purchaseDate: new Date(resData.startTime).getTime(),
}
callback({ ok: true, data: { id: JSON.parse(product.transaction.receipt).productId, latest_receipt: true, collection: [collectionPurchase], transaction: resData } });
// resData -server validation response
@Afrykakod123 Thank You!
Hello!
I'm creating my own receipt validation, and I'm stuck at the point of creating a callback after server-side validation
callback({ ok: true, data: { id: ob.subscriptionId, latest_receipt: true, collection: ?, transaction: resData } });
I can't figure out how to handle the "collection" The collection of purchases in this receipt. An array of ValidatorPurchase
"NativeTransactions" is the result of server-side verification, "collection" is something I can't find; do I need to create it myself?
Please provide guidance or a link to instructions on how to do it.
System Info
Output of cordova info. OS: Microsoft Windows 11 Home 10.0.22621 (22621) (Windows 10.0.22621) #x64
Node: v18.14.2 npm: 9.5.0