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

Fixed Payment gateway - Razorpay #80

Merged
merged 4 commits into from
Oct 11, 2024
Merged

Fixed Payment gateway - Razorpay #80

merged 4 commits into from
Oct 11, 2024

Conversation

ArchanRD
Copy link
Contributor

@ArchanRD ArchanRD commented Oct 11, 2024

Pull Request Checklist

Thank you for contributing to our project! Please ensure the following before submitting your pull request:

Description of Changes

Fixed razorpay form. Now it opens whenever user is redirected to pay.php.
Other issues which was dependent to successfully run the payment gateway are addressed below:
1. Restaurant id missing:
Restaurant id was not sent properly. While running the orders query on verify.php, it was throwing the following error:

1  rid
To fix this, I imported the rest_id into a variable from the session in file checkout.php.

$rid = $_SESSION['rest_id'];

2. No default value for order in orders table:
The order attribute is set to NOT NULL and no default value if provided in the query. Hence resulted in throwing error after payment is done.
2  order default value not foudn

To fix this, the order value if passed in the query. It is properly commented in the code.

3. Wrong redirect - Trackorder.php:
Here there was a typo error in the file name track_order.php which was Track_order.php earlier. This resulted in a 404 page not found error.
404 track order

File name is corrected.

Now the flow is smooth and error free. A user can start from

  • Selecting a restaurant
  • Add items to cart
  • Fill checkout details
  • Pay using Razorpay
  • Get redirected and view orders on track_orders.php

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Other (please describe):

Related Issue

Closes: #75

Testing

Testing is performed completely, the workflow is smooth and error free.

Checklist

  • I have tested my changes and ensured they work as expected.
  • I have added necessary documentation (if applicable).
  • I have reviewed my code for style and linting issues.
  • I have ensured that any dependent changes are merged before this PR.

Additional Notes

@Vimall03 Please have a look at this PR. The issue is resolved.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Thank you for contributing to this project, your support is much appreciated.

Stay awesome! 😎

@Vimall03 Vimall03 merged commit 43647ac into Vimall03:main Oct 11, 2024
1 check passed
@ArchanRD
Copy link
Contributor Author

Hey! @Vimall03 could please add gssoc-ext and hacktoberfest labels on the pr as well?

@Vimall03
Copy link
Owner

Sorry @ArchanRD, I have updated the labels now

@ArchanRD
Copy link
Contributor Author

Appreciate it! 🙌🏻

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

Successfully merging this pull request may close these issues.

[BUG] Razorpay not auto-opening on pay.php
2 participants