我在Meteor Node应用程序上使用正方形连接,我能够连接到许多API都没问题,但是在尝试连接到支付API时遇到错误
TypeError:Square.PaymentsApi不是构造函数 W20190825-09:55:25.087(-4)? (STDE
import Square from 'square-connect'
Square.ApiClient.instance.basePath =
'https://connect.squareupsandbox.com';
Square.ApiClient.instance.authentications.oauth2.accessToken =
Meteor.settings.SQUARE.SANDBOXTOKEN
const squarePaymentsApi = new Square.PaymentsApi();
const locationsApi = new Square.LocationsApi();
const squareTrasactionsApi = new Square.TransactionsApi();
const squareCustomersApi = new Square.CustomersApi()
我已经浏览了许多文档,并且付款API似乎位于节点文件夹中。我尝试删除所有build / npm文件并重新安装此应用。