Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Conversation

Suryansh777777
Copy link

Resolve Issue #306
@VineeTagarwaL-code

Untitled.design.mp4

Special Thanks to @ItsFlash10

@VineeTagarwaL-code
Copy link
Collaborator

Great work buddy, reviewing the code right now check your discord dm lets hop on a call too

@VineeTagarwaL-code
Copy link
Collaborator

fix the build and conflicts please

@VineeTagarwaL-code
Copy link
Collaborator

Build errors still exist, please solve them ... need to merge this asap

@Suryansh777777
Copy link
Author

You'll have to add env variables for Razorpay in github actions
and in the workflow yaml

}
data.companyLogo = (await submitImage(file)) ?? '';
await processPayment({
amount: 1000,
Copy link
Contributor

@aakash2330 aakash2330 Sep 18, 2024

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', {
Copy link
Contributor

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',
Copy link
Contributor

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');
Copy link
Contributor

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
Copy link
Contributor

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;
Copy link
Contributor

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,
Copy link
Contributor

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 });
Copy link
Contributor

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

@chaitanyashetty47
Copy link

hey is this issue still up? can i work on it?

@VineeTagarwaL-code
Copy link
Collaborator

not for now we dont need it anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants