Getting this error while using braintree sdk for Nodejs (v14.15.0) on a local machine (Win 10 x64).
Here is the minimal code:
private constructor(merchantId: string, publicKey: string, privateKey: string, env?: braintree.Environment) {
this._gateway = new braintree.BraintreeGateway({
merchantId,
publicKey,
privateKey,
environment: env
});
}
async CreateCustomer(firstName: string, lastName: string, email: string): Promise<BraintreeCreateCustomerResponse> {
let data = await this._gateway.customer.create({
firstName,
lastName,
email
});
return { Id: data.customer.id };
}