I have a problem with users paying via combini (Japan).
Those who pay via combini will then be automatically refunded by Google Play.
It seems that after changing the payment status to PurchaseStatus.purchased, it does not run to the logic of unlock feature.
I tested with the case slow test card according to the link below.
https://developer.android.com/google/play/billing/test#pending-purchases
And see the processing working normally.
I think the behavior of paying via combini is similar to slow test card.
Does anyone have any solution?
final Stream purchaseUpdated = InAppPurchase.instance.purchaseStream;
_subscription = purchaseUpdated.listen((purchaseDetailsList) {
purchaseDetailsList.forEach((PurchaseDetails purchaseDetails) async {
if (purchaseDetails.status == PurchaseStatus.pending) {
// Update UI and return
return;
}
if (purchaseDetails.status == PurchaseStatus.purchased || purchaseDetails.status == PurchaseStatus.restored) {
// Handle receipt and unlock feature
if (purchaseDetails.pendingCompletePurchase) {
await InAppPurchase.instance.completePurchase(purchaseDetails);
}
return;
}
// Handle for others PurchaseStatus
}, onDone: () {
_subscription.cancel();
}, onError: (error) {
// Handle error
}
});