DavidAJohn / PhotoPortfolio

Personal photo portfolio .NET web application which implements a Blazor and Tailwind CSS user interface with a MongoDb database, and includes integration with Stripe Checkout and Prodigi Print API
0 stars 1 forks source link

Admin orders page - link to Stripe Dashboard #16

Closed DavidAJohn closed 1 year ago

DavidAJohn commented 1 year ago

While working on the Admin > Orders page it struck me that it would be quite useful to be able to go directly to the order details held in the Stripe Dashboard.

The link appears to be in the format: https://dashboard.stripe.com/test/payments/[payment_intent_id]

The payment intent id is in the root of the 'checkout session complete' object, so we can potentially extract it at the same time as the order id - in the PaymentsController's webhook method. This could then be stored in the database as part of the Order model.

It would then be a simple case of adding a button that redirects to the dynamically-constructed Stripe Dashboard URL.