#V2 payment provider razorpay

26 messages · Page 1 of 1 (latest)

hidden matrix
#

I am building the payment provider for v2.. but had a Fundamental question. Do I build it in the modules folder or proje t root.. for so e reason after putting everything in the module folder following the stripe provider structure. Mit doesn't build

sinful field
#

What errors are you getting?

hidden matrix
#

thanks i figured it out.

#

it was a stupid error in the way i was configuring the provider :)..

hidden matrix
#

getting this weired error when checking out..

#

Error was thrown trying to authorize payment session - payses_01JBBX0BW13M48GP2MMME9D2G4 - Error: Could not find a payment provider with id: pp_razorpay_razorpay

#

in the server

#

i know the payment provider is registered

#

i'm logging it here provider: pp_system_default
provider: pp_razorpay_razorpay

#

any suggestions ?

sinful field
#

Is this error coming from the backend or the storefront?

#

modules: [
{
resolve: "@medusajs/medusa/payment",
options: {
providers: [
{
resolve: "./src/modules/razorpay",
id: "razorpay",
options: {
apiKey: "..."
}
}
]
}
}
]

#

Add this to your medusa_config

#

And in your payment processor service.ts file, add this: static identifier = "razorpay"

hidden matrix
#

ok here is the config..

#

{ resolve: "@medusajs/medusa/payment",
options: {
providers: [
{
resolve: "@sgftech/payment-razorpay",
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_HOOK_SECRET ??
process?.env?.RAZORPAY_WEBHOOK_SECRET
}
},

#

i've published this @sgftech/payment-razorpay"

hidden matrix
#

front end throws this error

#

Error setting up the request: fetch failed

hidden matrix
hidden matrix
#

how do i guest customer details in v2 as the cart object is no longer sent at the time of payment session initiation

#

only session_id is sent

round berry
#

Excited for the release

hidden matrix
round berry
#

Can the default payment be used for the COD?