Skip to content

Getting error when integrating RAZORPAY in medusa app #2

@Fox333-Lab

Description

@Fox333-Lab

Hi,
Tried integrating RAZORPAY in medusa application using the following guide:
https://medusajs.com/integrations/medusa-plugin-razorpay-v2/

but i am getting the below error when running the medusa application using command "yarn dev"

Image

below is my content in medusa.config.ts:

module.exports = defineConfig({
projectConfig: {
databaseUrl: process.env.DATABASE_URL,
http: {
storeCors: process.env.STORE_CORS!,
adminCors: process.env.ADMIN_CORS!,
authCors: process.env.AUTH_CORS!,
jwtSecret: process.env.JWT_SECRET || "supersecret",
cookieSecret: process.env.COOKIE_SECRET || "supersecret",
},
},
plugins: ["medusa-plugin-razorpay-v2"],
modules: [
{
resolve: "@medusajs/medusa/payment",
options: {
dependencies: [
Modules.CUSTOMER,
Modules.ORDER,
Modules.PAYMENT,
Modules.CART,
ContainerRegistrationKeys.MANAGER,
ContainerRegistrationKeys.LOGGER,
Modules.LINK,
ContainerRegistrationKeys.LINK,
ContainerRegistrationKeys.QUERY,
ContainerRegistrationKeys.PG_CONNECTION,
],
providers: [
{
resolve: "medusa-plugin-razorpay-v2/providers/payment-razorpay/src",
id: "razorpay",
options: {
key_id:
process?.env?.RAZORPAY_TEST_KEY_ID ?? process?.env?.RAZORPAY_ID,
key_secret:
process?.env?.RAZORPAY_TEST_KEY_SECRET ??
process?.env?.RAZORPAY_SECRET,
razorpay_account:
process?.env?.RAZORPAY_TEST_ACCOUNT ??
process?.env?.RAZORPAY_ACCOUNT,
automatic_expiry_period: 30 /* any value between 12minuts and 30 days expressed in minutes */,
manual_expiry_period: 20,
refund_speed: "normal",
webhook_secret:
process?.env?.RAZORPAY_TEST_WEBHOOK_SECRET ??
process?.env?.RAZORPAY_WEBHOOK_SECRET,
},
},
],
},
},
],
});

medusa app version i am using is : 2.7.1

please help i need it urgently, any suggestions anybody.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions