Skip to content

Commit

Permalink
Merge pull request #21 from builtbysuraj/feat/server-login
Browse files Browse the repository at this point in the history
Feat/server login
  • Loading branch information
builtbysuraj authored Feb 11, 2024
2 parents ae3aee6 + 025b735 commit 0b75d50
Show file tree
Hide file tree
Showing 34 changed files with 464 additions and 434 deletions.
2 changes: 1 addition & 1 deletion client/src/context/ServerStatusProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function ServerStatusProvider({ children }: PropsWithChildren) {
useEffect(() => {
const checkServerStatus = async () => {
try {
const { data } = await axios.get(`${ENV.SERVER_URL}/api/status`)
const { data } = await axios.get(`${ENV.SERVER_URL}/api/v1/status`)

if (data.status) {
setServerStatus(data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function PlaceOrder() {
amount: order.amount,
currency: 'INR',
name: 'RazorPay',
description: 'Tutorial of RazorPay',
description: 'Secure payment through RazorPay',
// image: 'https://avatars.githubusercontent.com/u/25058652?v=4',
order_id: order.id,
callback_url: 'http://localhost:5000/api/v1/paymentverification',
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/payment-success/PaymentSuccessPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function PaymentSuccessPage() {
if (referenceNum) {
console.log(referenceNum)
const response = await fetch(
`http://localhost:5000/verify-payment?paymentId=${referenceNum}`
`http://localhost:5000/api/v1/verify-payment?paymentId=${referenceNum}`
)
const data = await response.json()
if (data.success) {
Expand Down
7 changes: 7 additions & 0 deletions server/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MONGODB_URL=<mongodb_cloud_url>
MONGODB_URL_LOCAL=mongodb://127.0.0.1:27017

RAZORPAY_API_KEY=<razorpay_api_key>
RAZORPAY_APT_SECRET=<razorpay_api_secret>

CORS_ORIGIN=*
Loading

0 comments on commit 0b75d50

Please sign in to comment.