Category

Payment

Version

1.0.11

Last updated

Jul 7, 2023, 21:09:44 PMa year ago

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 clipboardmedusa-config.js
3. Check that the variables are set with the appropriate values

const 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 clipboardplugin, add the following

{
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,
},
},

Build your own plugins

Develop your own plugins with our API to speed up your processes.

Make your plugin available via npm for it to be shared in our Plugin Library with the broader Medusa community.