Fixed issue with reporting purchase token to server

pull/14/head
Sam Bosley 13 years ago
parent b3f41f830c
commit 93d52400ac

@ -962,7 +962,9 @@ public final class ActFmSyncService {
String purchaseToken = Preferences.getStringValue(BillingConstants.PREF_PURCHASE_TOKEN); String purchaseToken = Preferences.getStringValue(BillingConstants.PREF_PURCHASE_TOKEN);
String productId = Preferences.getStringValue(BillingConstants.PREF_PRODUCT_ID); String productId = Preferences.getStringValue(BillingConstants.PREF_PRODUCT_ID);
try { try {
actFmInvoker.invoke("premium_update_android", "purchase_token", purchaseToken, "product_id", productId); if (!checkForToken())
throw new ActFmServiceException("Not logged in", null);
actFmInvoker.invoke("premium_update_android", "purchase_token", purchaseToken, "product_id", productId, "token", token);
Preferences.setBoolean(BillingConstants.PREF_NEEDS_SERVER_UPDATE, false); Preferences.setBoolean(BillingConstants.PREF_NEEDS_SERVER_UPDATE, false);
if (onSuccess != null) if (onSuccess != null)
onSuccess.run(); onSuccess.run();

Loading…
Cancel
Save