diff --git a/packages/nodes-base/credentials/PayPalApi.credentials.ts b/packages/nodes-base/credentials/PayPalApi.credentials.ts index ed1554facf..5d6f558f16 100644 --- a/packages/nodes-base/credentials/PayPalApi.credentials.ts +++ b/packages/nodes-base/credentials/PayPalApi.credentials.ts @@ -22,7 +22,7 @@ export class PayPalApi implements ICredentialType { default: '', }, { - displayName: 'Enviroment', + displayName: 'Environment', name: 'env', type: 'options' as NodePropertyTypes, default: 'live', diff --git a/packages/nodes-base/nodes/PayPal/GenericFunctions.ts b/packages/nodes-base/nodes/PayPal/GenericFunctions.ts index 82d3ebd34c..25b7278ea6 100644 --- a/packages/nodes-base/nodes/PayPal/GenericFunctions.ts +++ b/packages/nodes-base/nodes/PayPal/GenericFunctions.ts @@ -15,7 +15,7 @@ import { export async function payPalApiRequest(this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IWebhookFunctions, endpoint: string, method: string, body: any = {}, query?: IDataObject, uri?: string): Promise { // tslint:disable-line:no-any const credentials = this.getCredentials('payPalApi'); - const env = getEnviroment(credentials!.env as string); + const env = getEnvironment(credentials!.env as string); const tokenInfo = await getAccessToken.call(this); const headerWithAuthentication = Object.assign({ }, { Authorization: `Bearer ${tokenInfo.access_token}`, 'Content-Type': 'application/json' }); @@ -43,7 +43,7 @@ export async function payPalApiRequest(this: IHookFunctions | IExecuteFunctions } } -function getEnviroment(env: string): string { +function getEnvironment(env: string): string { // @ts-ignore return { 'sanbox': 'https://api.sandbox.paypal.com', @@ -56,7 +56,7 @@ async function getAccessToken(this: IHookFunctions | IExecuteFunctions | IExecut if (credentials === undefined) { throw new Error('No credentials got returned!'); } - const env = getEnviroment(credentials!.env as string); + const env = getEnvironment(credentials!.env as string); const data = Buffer.from(`${credentials!.clientId}:${credentials!.secret}`).toString(BINARY_ENCODING); const headerWithAuthentication = Object.assign({}, { Authorization: `Basic ${data}`, 'Content-Type': 'application/x-www-form-urlencoded' });