medusa-payment-razorpay
medusa-payment-razorpay copied to clipboard
404 after completing an order
Bug report
Describe the bug
Medusa store redirects to 'http://localhost:8000/order/confirmed/cart_xxxx....' after the completion of the order. Hence, the cart doesn't convert into an order despite running the completeCheckout mutation.
I am using the razorpay plugin for medusa (https://github.com/SGFGOV/medusa-payment-razorpay)
System information
Medusa version (including plugins):
"@medusajs/admin": "6.0.3",
"@medusajs/cache-inmemory": "1.8.8",
"@medusajs/cache-redis": "1.8.8",
"@medusajs/event-bus-local": "1.9.6",
"@medusajs/event-bus-redis": "1.8.9",
"@medusajs/medusa": "1.12.3",
"body-parser": "1.20.2",
"cors": "^2.8.5",
"dotenv": "16.3.1",
"express": "4.18.2",
"medusa-file-spaces": "^1.3.7",
"medusa-fulfillment-manual": "1.1.38",
"medusa-interfaces": "^1.3.7",
"medusa-payment-manual": "1.0.24",
"medusa-payment-razorpay": "^3.0.2",
"medusa-plugin-algolia": "^0.2.19",
"typeorm": "0.3.17"
Node.js version: v20.2.0 Database: Postgres (supabase) Operating system: MacOS 13.2.1 Browser (if relevant): Arc
Steps to reproduce the behavior
- Select the product and checkout, filling all the details. Since I am using the razorpay, so fill the test cards and complete the checkout.
- When the payment is complete, storefront redirects to a confirm page with a cart id instead of an order id, and the order is not created in the database.
Expected behavior
Order should have been created in the database and the redirect URL should contain the order ID starting with order_xxx.., instead of a cart id cart_xxx...
Screenshots
If applicable, add screenshots to help explain your problem
Code snippets
Checkout-Context- https://gist.github.com/imprakharshukla/3b3b819aa32da89051dae410b6a0137f payment-button: - https://gist.github.com/imprakharshukla/4150620a3a32b5a62bffd0477a0925b2
Additional context
Server Logs- https://gist.github.com/imprakharshukla/96d03fde9ddbb535b52c87147148948c Frontend Logs- https://gist.github.com/imprakharshukla/3cea82e6929bfe746823133c5b7ecb5f Frontend Console output- https://gist.github.com/imprakharshukla/d63e4d54d7c0ab0646ba11236875552e
I am using the razorpay plugin for medusa (https://github.com/SGFGOV/medusa-payment-razorpay)
I tested the same setup with stripe and it works flawlessly. Please try testing the plugin with the latest version of medusa and the nextjs starter (Next 13).
Please follow- https://docs.medusajs.com/starters/nextjs-medusa-starter
From the medusa docs-
Before v1.8 of Medusa, this guide explained how to create a payment provider. Payment Providers are now considered legacy and are deprecated. Moving forward, it's recommended to create a Payment Processor that implements the Payment Processor API.
https://docs.medusajs.com/modules/carts-and-checkout/backend/add-payment-provider#updatepayment
I will try to contribute as much as I can.
From the medusa docs-
Before v1.8 of Medusa, this guide explained how to create a payment provider. Payment Providers are now considered legacy and are deprecated. Moving forward, it's recommended to create a Payment Processor that implements the Payment Processor API.
https://docs.medusajs.com/modules/carts-and-checkout/backend/add-payment-provider#updatepayment
I will try to contribute as much as I can.
This should be added to the project readme of every payment plugin
I have updated the plugin .it should hopefully redirect to order page now
Best Regards Govind Diwakar
On Fri, 4 Aug, 2023, 21:28 Arunim Chaudhary, @.***> wrote:
From the medusa docs-
Before v1.8 of Medusa, this guide explained how to create a payment provider. Payment Providers are now considered legacy and are deprecated. Moving forward, it's recommended to create a Payment Processor that implements the Payment Processor API.
https://docs.medusajs.com/modules/carts-and-checkout/backend/add-payment-provider#updatepayment
I will try to contribute as much as I can.
This should be added to the project readme of every payment plugin
— Reply to this email directly, view it on GitHub https://github.com/SGFGOV/medusa-payment-razorpay/issues/7#issuecomment-1665845404, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXEQJHHF5J757WP5IV5JASTXTUL2LANCNFSM6AAAAAA2TFGUTM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
--
This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.
Updated to support payment processors.. happy to accept prs if tou find bugs.
Best Regards Govind Diwakar
On Fri, 4 Aug, 2023, 21:31 Govind Diwakar, < @.***> wrote:
I have updated the plugin .it should hopefully redirect to order page now
Best Regards Govind Diwakar
On Fri, 4 Aug, 2023, 21:28 Arunim Chaudhary, @.***> wrote:
From the medusa docs-
Before v1.8 of Medusa, this guide explained how to create a payment provider. Payment Providers are now considered legacy and are deprecated. Moving forward, it's recommended to create a Payment Processor that implements the Payment Processor API.
https://docs.medusajs.com/modules/carts-and-checkout/backend/add-payment-provider#updatepayment
I will try to contribute as much as I can.
This should be added to the project readme of every payment plugin
— Reply to this email directly, view it on GitHub https://github.com/SGFGOV/medusa-payment-razorpay/issues/7#issuecomment-1665845404, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXEQJHHF5J757WP5IV5JASTXTUL2LANCNFSM6AAAAAA2TFGUTM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
--
This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.
I have updated the plugin .it should hopefully redirect to order page now Best Regards Govind Diwakar … On Fri, 4 Aug, 2023, 21:28 Arunim Chaudhary, @.> wrote: From the medusa docs- Before v1.8 of Medusa, this guide explained how to create a payment provider. Payment Providers are now considered legacy and are deprecated. Moving forward, it's recommended to create a Payment Processor that implements the Payment Processor API. https://docs.medusajs.com/modules/carts-and-checkout/backend/add-payment-provider#updatepayment I will try to contribute as much as I can. This should be added to the project readme of every payment plugin — Reply to this email directly, view it on GitHub <#7 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXEQJHHF5J757WP5IV5JASTXTUL2LANCNFSM6AAAAAA2TFGUTM . You are receiving this because you are subscribed to this thread.Message ID: @.> -- This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.
Still the order is not being created, and shows cannot find "placeOrder" function.
thanks in advance.