Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:To fix this, I imported the
rest_id
into a variable from the session in filecheckout.php
.2. No default value for order in orders table:
![2 order default value not foudn](https://private-user-images.githubusercontent.com/74826173/375740508-7036a3ec-2063-4bab-a513-890b25fc3990.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2ODkzNDIsIm5iZiI6MTczOTY4OTA0MiwicGF0aCI6Ii83NDgyNjE3My8zNzU3NDA1MDgtNzAzNmEzZWMtMjA2My00YmFiLWE1MTMtODkwYjI1ZmMzOTkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA2NTcyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg4OGE3ZmVjNTg5NjgwZTBmMmI5MTg0NWMwNjU0NzY1NGUwNWIwNzUzMTE4ZjMxYzI3MGVjYjZkNmI3ZTAwYTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XkwspoLfA5-v-gYAiEo8ELPLcwDHHKimdvT0DSppzEo)
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.To fix this, the order value if passed in the query. It is properly commented in the code.
3. Wrong redirect - Trackorder.php:
![404 track order](https://private-user-images.githubusercontent.com/74826173/375741227-56f595ec-a2e8-4e37-879f-fc26739d9931.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2ODkzNDIsIm5iZiI6MTczOTY4OTA0MiwicGF0aCI6Ii83NDgyNjE3My8zNzU3NDEyMjctNTZmNTk1ZWMtYTJlOC00ZTM3LTg3OWYtZmMyNjczOWQ5OTMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA2NTcyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI1YjExZjM3ODY1YmYyMzFhNDdjOGU0OGY0ZjE4YzJjNDMyYTZhODgwMDY4OTk4NGFmMjRhZjI1YjM3ZDZiMWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Z_c1haqUTTVHPv1ug59sZXXlrN48YSiAnYmVnlWqJQU)
Here there was a typo error in the file name
track_order.php
which wasTrack_order.php
earlier. This resulted in a 404 page not found error.File name is corrected.
Now the flow is smooth and error free. A user can start from
Type of Change
Related Issue
Closes: #75
Testing
Testing is performed completely, the workflow is smooth and error free.
Checklist
Additional Notes
@Vimall03 Please have a look at this PR. The issue is resolved.