medusa
medusa copied to clipboard
Razorpay order_id ,'An error occurred in updatePayment:\r\n`order_id` is mandatory' and also in client side "usecheckout" from checkout-context file is not available in latest medusa
Bug report
import { useCheckout } from "@lib/context/checkout-context"
file not available and
data: {
code: '',
type: 'invalid_data',
message: 'An error occurred in updatePayment:\r\norder_id
is mandatory'
}
},
Describe the bug
A clear and concise description of what the bug is.
Code snippets
const plugins = [
{
resolve: medusa-payment-razorpay
,
options: {
key_id: process.env.RAZORPAY_ID ?? "",
key_secret: process.env.RAZORPAY_SECRET?? "",
razorpay_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_SECRET??"",
}
},
documentation :https://medusajs.com/plugins/medusa-payment-razorpay/ If applicable, add code samples to help explain your problem
Hey @suganyasai1026 I am also trying to integrate razorpay and facing the exact same issue
were you able to solve this ?
no
There are two issues with respect to plugin -
- order_id needs to be added in file
medusa-core/packages/medusa/src/interfaces/payment-processor.ts
which is consumed by pluginmedusa-payment-razorpay
- order_id needs to be added in plugin
medusa-payment-razorpay
under filesrc/core/razorpay-base.ts
in methods -
async initiatePayment(
context: PaymentProcessorContext
): Promise<PaymentProcessorError | PaymentProcessorSessionResponse> {
const intentRequestData = this.getPaymentIntentOptions();
const {
email,
currency_code,
amount,
resource_id,
customer,
paymentSessionData,
order_id
} = context;
and
async updatePayment(
context: PaymentProcessorContext
): Promise<PaymentProcessorError | PaymentProcessorSessionResponse | void> {
const { amount, customer, paymentSessionData, currency_code, order_id } = context;
@suganyasai1026 or @sumanchy88 did you people find any solution for this as i am facing the same issue
Hey! Guys I am facing the same issue, any solutions ?
Any solution I still looking ?
@suganyasai1026 @whiletrueee @theStonedSage @sumanchy88 @rishabh-zangoh @manishkumar212111
can you help me with this error.
I have completed entire steps but I the payment button is disabled
updated 3 files (constants.tsx, payment-button/index.tsx, payment-button/razorpay-payment-button.tsx and env.local with keyidas rzp_test_... storename and discription
@youreachedrahat Please use this https://www.npmjs.com/package/medusa-payment-razorpay-poorvika
I ran this command npm i medusa-payment-razorpay-poorvika
to install
but still getting this issue no
⠋ Initializing plugin models
error: Error starting server
Error: Unable to find plugin "medusa-payment-razorpay". Perhaps you need to install its package?
Also update plugin name in Medusa-config
On Tue, 9 Jul 2024 at 8:13 PM, Rahat Sayyed @.***> wrote:
I ran this command npm i medusa-payment-razorpay-poorvika to install but still getting this issue no
⠋ Initializing plugin models error: Error starting server Error: Unable to find plugin "medusa-payment-razorpay". Perhaps you need to install its package?
— Reply to this email directly, view it on GitHub https://github.com/medusajs/medusa/issues/6511#issuecomment-2217918168, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBP56AVE5PELJG7M35CBFTZLPZHPAVCNFSM6AAAAABD2HJDI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJXHEYTQMJWHA . You are receiving this because you were mentioned.Message ID: @.***>
Now I have same issue as others
error: unable to retrieve customer from cart
error: unable to find razorpay customer
error: no customer billing found:
no customer billing found null
Error: no customer billing found:
no customer billing found null
{
type: 'invalid_data',
code: '',
date: 2024-07-09T14:47:51.706Z
}
client side
message: 'no customer billing found:\r\nno customer billing found null'
Create new customer and then try
On Tue, 9 Jul 2024 at 8:21 PM, Rahat Sayyed @.***> wrote:
Now I have same issue as others
error: unable to retrieve customer from cart error: unable to find razorpay customer error: no customer billing found: no customer billing found null Error: no customer billing found: no customer billing found null
{ type: 'invalid_data', code: '', date: 2024-07-09T14:47:51.706Z }
client side
message: 'no customer billing found:\r\nno customer billing found null'
— Reply to this email directly, view it on GitHub https://github.com/medusajs/medusa/issues/6511#issuecomment-2217935925, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBP56FWAGQQAELRNHP2FVTZLP2HDAVCNFSM6AAAAABD2HJDI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJXHEZTKOJSGU . You are receiving this because you were mentioned.Message ID: @.***>
already have user
⠋ Initializing defaults
TypeError: Cannot read properties of undefined (reading 'getRepeatableJobs')
is it related
@youreachedrahat Do you have any updates?
I get the error TypeError: Cannot read properties of undefined (reading 'getRepeatableJobs')
Using the plugin from the community medusa-plugin-postmark
, maybe if you know a solution to your problem with this error it will help me too
Thanks in advance for your answer