Configuration
In order to be able to use the kobil-pay as a payment provider, you have to add the configuration to your newly added plugins in Medusajs. To do so here are the steps
1. Configure your developer console
2. Go to your Copy to clipboard
3. Check that the variables are set with the appropriate values
2. Go to your Copy to clipboard
medusa-config.js
3. Check that the variables are set with the appropriate values
123456const KOBIL_CLIENT_ID = process.env.CLIENT_ID;const KOBIL_CLIENT_SECRET = process.env.CLIENT_SECRET;const KOBIL_AUTH_URL = process.env.KOBIL_AUTH_URL;const KOBIL_TOKEN_URL = process.env.KOBIL_TOKEN_URL;const KOBIL_PAY_INITIATE_URL = process.env.KOBIL_PAY_INITIATE_URL;const BASE_URL = process.env.BASE_URL;
Then in your plugins collections, if you did not already inserted the Copy to clipboard
plugin
, add the following123456789101112{resolve: "medusa-plugin-kobil-pay",options: {client_id: KOBIL_CLIENT_ID,client_secret: KOBIL_CLIENT_SECRET,authorization_url: KOBIL_AUTH_URL,token_url: KOBIL_TOKEN_URL,initiate_url: KOBIL_PAY_INITIATE_URL,callback_url: `${BASE_URL}/kobil/payment/callback`,transaction_timeout: 10,},},