Hi support team! I am wondering how would one implement Stripe SDK in backendless? Am I right in this process? If I am then I am stuck in step 4. I uploaded the zip files and unzipped them, they are all in the file services. However, I don’t know how to implement Stripe SDK?
Stripe SDK:
To use packages like stripe, you must:
- Download the server code (.zip)
- Install the stripe SDK locally with npm install stripe
- Re-zip the folder
- Upload it to Backendless
Hi @Nasser_Othman
According to your previous topic, can I assume you are working on CloudCode (JS)?
If so, you can
- download the project
- unzip it
- run
npm i
inside the project
- then install any npm module
npm i {YOUR-MODULE} -S
- and finally run
npm run deploy
to deploy all code
Regards,
Vlad
Yes I am working on CloudCode (JS)! It works now because I used the coderunner CLI. however when I deployed Stripe SDK, it gave me an error. Not sure what this means. But my Stripe integration is fully operational now.
Does this mean the files I uploaded to backendless exceeded my plan’s limit?
yes, there are two option to solve the issue:
- by default the Coderunner adds all modules (folders in the node_modules directory) to the build and push it to the cloud, so need to exclude all unnecessary files from the build to reduce the build size. For that add file patterns to the
coderunner.json
file in the app => exclude
list:
It uses Glob format GitHub - isaacs/node-glob: glob functionality for node.js
You can exclude entire folders, but make sure you do not exclude any files which is required in runtime. Feel free to exclude all test/example files, normally they take lots of space but they are not used in runtime.
- another option is to buy a function pack in the market to extend the deployment size
Regards,
Vlad
thank you! I upgraded to the scale plan, the warning message is gone. My Stripe SDK is 9mb in size. I think it was necessary to upgrade.
1 Like