rename purchase calls

This commit is contained in:
Girish Ramakrishnan
2019-05-06 14:29:56 -07:00
parent d5f58eea34
commit 7bb6016f7b
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -1039,7 +1039,7 @@ function purchaseApp(data, callback) {
assert.strictEqual(typeof data, 'object');
assert.strictEqual(typeof callback, 'function');
appstore.purchase(data, function (error) {
appstore.purchaseApp(data, function (error) {
if (!error) return callback();
// if purchase failed, rollback the appdb record
@@ -1161,7 +1161,7 @@ function uninstall(appId, auditSource, callback) {
get(appId, function (error, app) {
if (error) return callback(error);
appstore.unpurchase(appId, { appstoreId: app.appStoreId, manifestId: app.manifest.id }, function (error) {
appstore.unpurchaseApp(appId, { appstoreId: app.appStoreId, manifestId: app.manifest.id }, function (error) {
if (error && error.reason === AppstoreError.NOT_FOUND) return callback(new AppsError(AppsError.NOT_FOUND));
if (error && error.reason === AppstoreError.BILLING_REQUIRED) return callback(new AppsError(AppsError.BILLING_REQUIRED, error.message));
if (error && error.reason === AppstoreError.INVALID_TOKEN) return callback(new AppsError(AppsError.BILLING_REQUIRED, error.message));