diff --git a/common/locales/en/api-v3.json b/common/locales/en/api-v3.json index d41c2a78d6..e0e768adf8 100644 --- a/common/locales/en/api-v3.json +++ b/common/locales/en/api-v3.json @@ -175,8 +175,6 @@ "resetComplete": "Reset completed", "lvl10ChangeClass": "To change class you must be at least level 10.", "equipmentAlreadyOwned": "You already own that piece of equipment", - "missingAccessToken": "The request is missing a required parameter : access_token", - "missingBillingAgreementId": "Missing billing agreement id", "paymentNotSuccessful": "The payment was not successful", "planNotActive": "The plan hasn't activated yet (due to a PayPal bug). It will begin <%= nextBillingDate %>, after which you can cancel to retain your full benefits", "cancelingSubscription": "Canceling the subscription" diff --git a/test/api/v3/integration/payments/POST-payments_amazon_checkout.test.js b/test/api/v3/integration/payments/POST-payments_amazon_checkout.test.js index 6a574eb204..8745a74e85 100644 --- a/test/api/v3/integration/payments/POST-payments_amazon_checkout.test.js +++ b/test/api/v3/integration/payments/POST-payments_amazon_checkout.test.js @@ -10,13 +10,11 @@ describe('payments - amazon - #checkout', () => { user = await generateUser(); }); - it('verifies credentials', async (done) => { - try { - await user.post(endpoint); - } catch (e) { - expect(e.error).to.eql('BadRequest'); - expect(e.message.type).to.eql('InvalidParameterValue'); - done(); - } + it('verifies credentials', async () => { + await expect(user.post(endpoint)).to.eventually.be.rejected.and.eql({ + code: 400, + error: 'BadRequest', + message: 'Missing req.body.orderReferenceId', + }); }); }); diff --git a/test/api/v3/integration/payments/POST-payments_amazon_verifyAccessToken.test.js b/test/api/v3/integration/payments/POST-payments_amazon_verifyAccessToken.test.js index db8edbabb0..51ccf8c41c 100644 --- a/test/api/v3/integration/payments/POST-payments_amazon_verifyAccessToken.test.js +++ b/test/api/v3/integration/payments/POST-payments_amazon_verifyAccessToken.test.js @@ -1,6 +1,5 @@ import { generateUser, - translate as t, } from '../../../../helpers/api-integration/v3'; describe('payments : amazon', () => { @@ -15,7 +14,7 @@ describe('payments : amazon', () => { await expect(user.post(endpoint)).to.eventually.be.rejected.and.eql({ code: 400, error: 'BadRequest', - message: t('missingAccessToken'), + message: 'Missing req.body.access_token', }); }); }); diff --git a/test/api/v3/integration/payments/POST-payments_paypal_ipn.test.js b/test/api/v3/integration/payments/POST-payments_paypal_ipn.test.js index f8e6c74f82..219e9ce35b 100644 --- a/test/api/v3/integration/payments/POST-payments_paypal_ipn.test.js +++ b/test/api/v3/integration/payments/POST-payments_paypal_ipn.test.js @@ -12,6 +12,6 @@ describe('payments - paypal - #ipn', () => { it('verifies credentials', async () => { let result = await user.post(endpoint); - expect(result).to.eql({}); + expect(result).to.eql('OK'); }); }); diff --git a/test/api/v3/integration/payments/POST-payments_stripe_checkout.test.js b/test/api/v3/integration/payments/POST-payments_stripe_checkout.test.js index 3f0cc15eaf..1443a3af74 100644 --- a/test/api/v3/integration/payments/POST-payments_stripe_checkout.test.js +++ b/test/api/v3/integration/payments/POST-payments_stripe_checkout.test.js @@ -11,7 +11,7 @@ describe('payments - stripe - #checkout', () => { }); it('verifies credentials', async () => { - await expect(user.post(endpoint)).to.eventually.be.rejected.and.eql({ + await expect(user.post(endpoint, {id: 123})).to.eventually.be.rejected.and.eql({ code: 401, error: 'Error', message: 'Invalid API Key provided: ****************************1111', diff --git a/test/api/v3/integration/payments/POST-payments_stripe_subscribe_edit.test.js b/test/api/v3/integration/payments/POST-payments_stripe_subscribe_edit.test.js index 4b2f889888..d6d568ace4 100644 --- a/test/api/v3/integration/payments/POST-payments_stripe_subscribe_edit.test.js +++ b/test/api/v3/integration/payments/POST-payments_stripe_subscribe_edit.test.js @@ -13,8 +13,8 @@ describe('payments - stripe - #subscribeEdit', () => { it('verifies credentials', async () => { await expect(user.post(endpoint)).to.eventually.be.rejected.and.eql({ - code: 400, - error: 'BadRequest', + code: 401, + error: 'NotAuthorized', message: t('missingSubscription'), }); });