TypeError:SSLCommerzPayment不是构造函数
我正在尝试访问SSLCommerz交易API进行付款网关集成,但是在API调用中,我会遇到此错误。
TypeError: SSLCommerzPayment is not a constructor
at D:\BlockChain\21.06.2022_PaymentGateway\secondPart\src\pages\app.js:58:24
at Layer.handle [as handle_request] (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\layer.js:95:5)
at next (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\route.js:144:13)
at Route.dispatch (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\route.js:114:3)
at Layer.handle [as handle_request] (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\layer.js:95:5)
at D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\index.js:284:15
at Function.process_params (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\index.js:346:12)
at next (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\index.js:280:10)
at jsonParser (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\body-parser\lib\types\json.js:110:7)
at Layer.handle [as handle_request] (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\layer.js:95:5)
如何解决问题?
I am trying to access SSLCommerz transaction api for payment gateway integration, but on api call I am getting this error.
TypeError: SSLCommerzPayment is not a constructor
at D:\BlockChain\21.06.2022_PaymentGateway\secondPart\src\pages\app.js:58:24
at Layer.handle [as handle_request] (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\layer.js:95:5)
at next (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\route.js:144:13)
at Route.dispatch (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\route.js:114:3)
at Layer.handle [as handle_request] (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\layer.js:95:5)
at D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\index.js:284:15
at Function.process_params (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\index.js:346:12)
at next (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\index.js:280:10)
at jsonParser (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\body-parser\lib\types\json.js:110:7)
at Layer.handle [as handle_request] (D:\BlockChain\21.06.2022_PaymentGateway\secondPart\node_modules\express\lib\router\layer.js:95:5)
How to solve the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过更改SSLCommerz的软件包解决了问题。我使用了SSLCommerz-LTS软件包,然后构造函数不显示错误。
然后我在命令提示符“ node index.js'中运行
我得到了输出。
I solved the problem by changing package for SSLCommerz. I used sslcommerz-lts package and then the constructor don't show the error.
Then I run in command prompt 'node index.js'
I got the output.
更改
为
,它将起作用
Change the
to
and it will work