Update Stripe Module in Parse Cloud Code

It turns out that the Stripe module in Parse Could Code is outdated and will not be updated.

A source:

https://developers.facebook.com/bugs/523104684492016/

Analysis modules use the old version of the API and there is no plan to update it in the near future.

As a workaround, download the new SDK directly from the third site, put it in the cloud folder and import it with require ();

We are going to close this by design.

I downloaded the Stripe module through the terminal with the command

npm install stripe 

I am trying to import this module, but when I deploy it to Parse, it seems that most of the modules are missing. I get errors like this:

Update error with error: module child_process.js not found in node_modules / stripe / lib / stripe.js: 24: 12

Hopefully someone can tell me how to properly add third-party modules to the Parse Cloud Code. Thanks.

+4
source share
2 answers

It seems that Parse module support is really limited, and adding submodules is either impossible or too difficult to even bother, so I decided to move to Heroka. Thanks for all the answers!

+2
source

I know this is a little outdated, but my β€œworkaround” was to convert cURL requests from Stripe documentation to Parse.Cloud.httpRequests instead of importing the module. You can access the entire API in this way.

0
source

Source: https://habr.com/ru/post/1233375/


All Articles