I am trying to develop a custom plugin for adding custom payment provider. I follow the instructions from the docs https://docs.medusajs.com/development/plugins/publish but when I try to test plugin in local machine using npm link it dose not work and I can not test my plugin. how can I fix it. please help me
I also test, medusa-payment-stripe from medusa plugin market https://medusajs.com/plugins/medusa-payment-stripe/ using npm install medusa-payment-stripe, it work properly but when I copy the stripe plugin code from the medusa core to check is it work locally then I found it does not work locally.
I also , added provider_id manually in database at payment_provider table but it give me following error
{ "type": "not_found", "message": "Could not find a payment provider with id: stripe" }
when you run your backend you should preserve symlinks for your backend to start with the linked pluging you can acheave that by this command :
or you can add it to your
package.json
scripts:and run it with :
Note: dont forget to add your plugin to your
medusa-config.js