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
I don't think that the closed issue#37 is correctly fixed, looking at the code I think it might be something wrong in the case for manual confirmations:
What I have seen from my testing, restore transactions do not always provide a notification id. Hence, it should not internally in the BillingController be added to the manual confirmation array at all?
for (Transaction p : purchases) {
if (p.notificationId != null && automaticConfirmations.contains(p.productId)) {
confirmations.add(p.notificationId);
} else {
// TODO: Discriminate between purchases, cancellations and //
refunds. addManualConfirmation(p.productId, p.notificationId);
}
storeTransaction(context, p);
notifyPurchaseStateChange(p.productId, p.purchaseState);
}
.
.
It could be something like this and in the notifyPurchaseStateChange callback the BillingController.confirmNotifications call would not matter in this case as it will not find the item in the manual confirmation list:
public static void onSignatureValidateResult(Context context, String signedData, String signature, boolean validationSuccessful) {
.
.
for (Transaction p : purchases) {
if (p.notificationId != null) {
if (automaticConfirmations.contains(p.productId)) {
confirmations.add(p.notificationId);
} else {
// TODO: Discriminate between purchases, cancellations and
// refunds.
addManualConfirmation(p.productId, p.notificationId);
}
}
Hi,
I don't think that the closed issue#37 is correctly fixed, looking at the code I think it might be something wrong in the case for manual confirmations:
What I have seen from my testing, restore transactions do not always provide a notification id. Hence, it should not internally in the BillingController be added to the manual confirmation array at all?
So a suggestion instead of this:
public static void onSignatureValidateResult(Context context, String signedData, String signature, boolean validationSuccessful) {
.
.
for (Transaction p : purchases) {
if (p.notificationId != null && automaticConfirmations.contains(p.productId)) {
confirmations.add(p.notificationId);
} else {
// TODO: Discriminate between purchases, cancellations and //
refunds. addManualConfirmation(p.productId, p.notificationId);
}
storeTransaction(context, p);
notifyPurchaseStateChange(p.productId, p.purchaseState);
}
.
.
It could be something like this and in the notifyPurchaseStateChange callback the BillingController.confirmNotifications call would not matter in this case as it will not find the item in the manual confirmation list:
public static void onSignatureValidateResult(Context context, String signedData, String signature, boolean validationSuccessful) {
.
.
for (Transaction p : purchases) {
if (p.notificationId != null) {
if (automaticConfirmations.contains(p.productId)) {
confirmations.add(p.notificationId);
} else {
// TODO: Discriminate between purchases, cancellations and
// refunds.
addManualConfirmation(p.productId, p.notificationId);
}
}
. . .
The text was updated successfully, but these errors were encountered: