Closed hassanmehdi98 closed 3 years ago
Not able to call any method, getting this error constantly while using it from a local machine
Here is the minimum code required for reproducing this:
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 }; }
Resolved by passing correct environment variable enum. Looks like @types/braintree was misleading
@types/braintree
General information
Issue description
Not able to call any method, getting this error constantly while using it from a local machine
Here is the minimum code required for reproducing this: