Problem with URL in node version 10
See original GitHub issueI’m facing up this problem in node version 10 and it can be solved like this https://stackoverflow.com/a/52794744
Do we have any update on it. Thank you!
TypeError: _url.URL is not a constructor at OnePay.js:132 at new Promise (<anonymous>) at OnePayInternational.buildCheckoutUrl (OnePay.js:77) at ConfirmPaymentPage._this._redirectToPayemntGateway (ConfirmPaymentPage.js:33) at HTMLUnknownElement.callCallback (react-dom.development.js:147) at Object.invokeGuardedCallbackDev (react-dom.development.js:196) at invokeGuardedCallback (react-dom.development.js:250) at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:265) at executeDispatch (react-dom.development.js:571) at executeDispatchesInOrder (react-dom.development.js:596) at executeDispatchesAndRelease (react-dom.development.js:695) at executeDispatchesAndReleaseTopLevel (react-dom.development.js:704) at forEachAccumulated (react-dom.development.js:676) at runEventsInBatch (react-dom.development.js:844) at runExtractedEventsInBatch (react-dom.development.js:852) at handleTopLevel (react-dom.development.js:5030) at batchedUpdates$1 (react-dom.development.js:21425) at batchedUpdates (react-dom.development.js:2247) at dispatchEvent (react-dom.development.js:5110) at react-dom.development.js:21482 at Object.unstable_runWithPriority (scheduler.development.js:255) at interactiveUpdates$1 (react-dom.development.js:21481) at interactiveUpdates (react-dom.development.js:2268) at dispatchInteractiveEvent (react-dom.development.js:5086)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top GitHub Comments
I think I know what’s wrong here. In the error log, I saw you were calling it from React, which is the front-end side. This package is supposed to be used on the back-end side. You have to write some routes on your back-end to handle the requests. You can check our example here:
https://github.com/naustudio/node-vn-payments/tree/master/example
Oh I suppose this lib for react front-end side, sorry, let me check. Thank you! @tttt-conan