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

404 after completing an order #7

Open
imprakharshukla opened this issue Jul 21, 2023 · 6 comments
Open

404 after completing an order #7

imprakharshukla opened this issue Jul 21, 2023 · 6 comments

Comments

@imprakharshukla
Copy link

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

  1. Select the product and checkout, filling all the details. Since I am using the razorpay, so fill the test cards and complete the checkout.
  2. 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)

@imprakharshukla
Copy link
Author

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

@imprakharshukla
Copy link
Author

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.

@arunim2405
Copy link

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

@SGFGOV
Copy link
Owner

SGFGOV commented Aug 4, 2023 via email

@SGFGOV
Copy link
Owner

SGFGOV commented Aug 4, 2023 via email

@prag-man
Copy link

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.

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

No branches or pull requests

4 participants