-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/add razorpay #323
feat/add razorpay #323
Conversation
Great work buddy, reviewing the code right now check your discord dm lets hop on a call too |
fix the build and conflicts please |
Build errors still exist, please solve them ... need to merge this asap |
You'll have to add env variables for Razorpay in github actions |
} | ||
data.companyLogo = (await submitImage(file)) ?? ''; | ||
await processPayment({ | ||
amount: 1000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep amount in env
return; | ||
} | ||
|
||
const order = await fetch('/api/order', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we turn these in actions ?
}, | ||
body: JSON.stringify({ | ||
amount: (amount * 100).toString(), | ||
currency: 'INR', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we not allowing other currencies ?
|
||
const intializeRazorpay = () => { | ||
return new Promise((resolve, reject) => { | ||
const script = document.createElement('script'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a next-script tag , it'll be cleaner (refer @ui//gmaps-autosuggest
<Button className="w-full rounded-full mt-4"> | ||
Continue to Payment | ||
|
||
<Button |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we put this button inside the form as a submit
); | ||
} | ||
|
||
const jobData = jsonBody.payload.payment.entity.notes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have lodash library in deps , lets leverage the _.get function to access nested values
} | ||
|
||
const transactionData = { | ||
razorpayOrderId: jsonBody.payload.payment.entity.order_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above comment
{ status: 200 } | ||
); | ||
} catch (error) { | ||
return NextResponse.json({ error }, { status: 500 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're serializing each api reponse to a certain shape , refer jobs/actions.ts
hey is this issue still up? can i work on it? |
not for now we dont need it anymore |
Resolve Issue #306
@VineeTagarwaL-code
Untitled.design.mp4
Special Thanks to @ItsFlash10⚡