I'm using the build in PayPal payment gateway. I have two checkout flows in my site therefore I can't hardcode the return URL in the PayPal settings. I've set this to go to an Umbraco suface controller.
I want to be able to get the invoice key so I can look this up in my controller and then pass it to my View.
I can see that PayPal does return this information like this:
For anybody who is interested I managed to get around this storing in the invoice key in ExtendedData before I redirect the user off to PayPal like so:
PayPal - get invoice key in controller
Hi
I'm using the build in PayPal payment gateway. I have two checkout flows in my site therefore I can't hardcode the return URL in the PayPal settings. I've set this to go to an Umbraco suface controller.
I want to be able to get the invoice key so I can look this up in my controller and then pass it to my View.
I can see that PayPal does return this information like this:
../umbraco/merchello/paypalexpress/success?invoiceKey=c4e16d7c-db24-4f94-b844-c7444f4ee59f&paymentKey=340fcc18-07d8-4321-b20d-e8833880ce88&token=EC-7RE13736NA577143J
and then performs a 302 redirect to the value of the Return URL field in Merchello's settings.
Is there anyway to get these values or pass these onto my controller?
Thanks
Ben
For anybody who is interested I managed to get around this storing in the invoice key in ExtendedData before I redirect the user off to PayPal like so:
I then retrieve on my view that I return the success to like :
Hope that helps somebody in the future
Hey Ben,
Yep - your basically storing the value in the encrypted Merchello cookie. That's a perfect use for it. This will also help with your receipt page.
Hi Ben,
On which view are setting that invoice key?
Can you be more specific please?
Kind Regards
I usually set it it in the controller:
Example:
https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web.Store/Controllers/Payment/PayPalExpressPaymentController.cs#L65
is working on a reply...