Search for a command to run...
In this document, you'll learn how to install and configure the Robokassa payment provider for Medusa.
yarn add @gorgo/medusa-payment-robokassaAdd the provider configuration in your file of the Medusa admin application:
medusa-config.js1// ...2module.exports = defineConfig({3 // ...4 modules: [5 {6 resolve: "@medusajs/medusa/payment",7 options: {8 providers: [9 {10 resolve: "@gorgo/medusa-payment-robokassa/providers/payment-robokassa",11 id: "robokassa",12 options: {13 merchantLogin: process.env.ROBOKASSA_MERCHANT_LOGIN,14 hashAlgorithm: process.env.ROBOKASSA_HASH_ALGORITHM,15 password1: process.env.ROBOKASSA_PASSWORD_1,16 password2: process.env.ROBOKASSA_PASSWORD_2,17 testPassword1: process.env.ROBOKASSA_TEST_PASSWORD_1,18 testPassword2: process.env.ROBOKASSA_TEST_PASSWORD_2,19 capture: false, // default is true20 isTest: true, // default is false21 },22 }23 ]24 }25 }26 ]27})
Add environment variables with your shop identifier , hash calculation algorithm , secret passwords , , and secret passwords for testing , :
.env1ROBOKASSA_MERCHANT_LOGIN=test-shop2ROBOKASSA_HASH_ALGORITHM=md53ROBOKASSA_PASSWORD_1=supersecret4ROBOKASSA_PASSWORD_2=supersecret5ROBOKASSA_TEST_PASSWORD_1=supersecret6ROBOKASSA_TEST_PASSWORD_2=supersecret
To properly handle payment notifications from Robokassa, configure the webhook URL in your Robokassa account as following:
Under shop settings in your Robokassa account, set the Method of sending data to Result Url to or and supply a Result Url in the following format:
https://{YOUR_MEDUSA_DOMAIN}/hooks/payment/robokassa_robokassa
Robokassa will send payment status updates to this URL, allowing Medusa to update the payment status accordingly.
Default:
Default:
Default: