Changes to match new API
This commit is contained in:
parent
51eb29d931
commit
82de18c775
2 changed files with 8 additions and 3 deletions
|
@ -118,7 +118,7 @@ public class InAppPurchaseActivity extends Activity implements InAppPurchaseList
|
|||
public void onClick(View v) {
|
||||
Purchasable item = (Purchasable) v.getTag();
|
||||
if (v.equals(recoverAccountButton)) {
|
||||
inAppPurchaseHelper.recoverAccount(getUsername());
|
||||
inAppPurchaseHelper.recoverAccount(getUsername(), item.getPayload(), item.getPayloadSignature());
|
||||
} else {
|
||||
inAppPurchaseHelper.purchaseItemAsync(item.getId(), getUsername());
|
||||
}
|
||||
|
@ -139,6 +139,11 @@ public class InAppPurchaseActivity extends Activity implements InAppPurchaseList
|
|||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivateAccountSuccessful(boolean success) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(final String error) {
|
||||
Log.e(error);
|
||||
|
|
|
@ -331,7 +331,7 @@ public class InAppPurchaseHelper {
|
|||
}
|
||||
}
|
||||
|
||||
public void recoverAccount(String sipUsername) {
|
||||
public void recoverAccount(String sipUsername, String purchasedData, String signature) {
|
||||
XMLRPCClient client = null;
|
||||
try {
|
||||
client = new XMLRPCClient(new URL(LinphonePreferences.instance().getInAppPurchaseValidatingServerUrl()));
|
||||
|
@ -362,7 +362,7 @@ public class InAppPurchaseHelper {
|
|||
Log.e("[In-app purchase] Server can't validate the payload and it's signature !");
|
||||
mListener.onError(SERVER_ERROR_SIGNATURE_VERIFICATION_FAILED);
|
||||
}
|
||||
}, "recover_account", mGmailAccount, sipUsername);
|
||||
}, "recover_account", mGmailAccount, sipUsername, purchasedData, signature, "google", mGmailAccount);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue