You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when user buy a autoRenewable product ,the product has not expire, when user cancel the autoRenewable , the restore buy call verifySubscriptions() function always return .notPurchased
To Reproduce
Steps to reproduce the behavior:
Step one...
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
class func verifySubscriptions(
ofType type: SubscriptionType,
productIds: Set<String>,
inReceipt receipt: ReceiptInfo,
validUntil date: Date = Date()
) -> VerifySubscriptionResult {
// The values of the latest_receipt and latest_receipt_info keys are useful when checking whether an auto-renewable subscription is currently active. By providing any transaction receipt for the subscription and checking these values, you can get information about the currently-active subscription period. If the receipt being validated is for the latest renewal, the value for latest_receipt is the same as receipt-data (in the request) and the value for latest_receipt_info is the same as receipt.
let (receipts, duration) = getReceiptsAndDuration(for: type, inReceipt: receipt)
let receiptsInfo = filterReceiptsInfo(receipts: receipts, withProductIds: productIds)
let nonCancelledReceiptsInfo = receiptsInfo.filter { receipt in receipt["cancellation_date"] == nil }
if nonCancelledReceiptsInfo.count == 0 {
return .notPurchased
}
The text was updated successfully, but these errors were encountered:
Bug Report
when user buy a autoRenewable product ,the product has not expire, when user cancel the autoRenewable , the restore buy call verifySubscriptions() function always return .notPurchased
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Platform Information
Additional context
Add any other context about the problem here.
Potentially Related Issues
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: