Has anyone used this in v12? I'm struggling to find any documentation for it. There is some documentation on payment providers but its related to implementing them rather than actually using it in an application.
The payment provider only really interacts at the point of submitting your payment form, so you need to add in markup, such as a the submit button to make that form submit. If you don't do that, then you won't submit your payment form, which in turn won't redirect the user to the hosted payment page.
I've not got any code to hand unfortunately, but for "demo" purposes, I'd try putting the example from that link above onto the page and see what happens when you click the button.
Well, it says 3011 : The NotificationURL format is invalid. However I have no control over the notification url I don't think.
This is what is in opayo's transaction log.
notificationurl=https://localhost:44394/umbraco/commerce/payment/callback/opayo-server/a2f60eb7-4714-4017-af7c-018cd4657794/01465-32468-DG8M9/c2f91f73e95d244a8900a1fcc8383c723fc2f9a0
Opayo doesn't support localhost domains, you need to set up a legit domain such as a ngrok one or another public domain that routes back to the website as Opayo needs to be able to call back to the website to get data for the requests.
So that could well be what's going wrong as it's unable to establish the correct transaction routing, so UmbracoComerce detects this and presents the cancel url to the form instead of the redirect to Opayo.
On the payment provider there is a setting called "OrderPropertyDescription" if you set this to the alias of a property on the order, you can then, in your code, set the description yourself, otherwise what you are seeing is the fallback default.
Umbraco Commerce Opayo Payment Provider
Hi
Has anyone used this in v12? I'm struggling to find any documentation for it. There is some documentation on payment providers but its related to implementing them rather than actually using it in an application.
Thanks.
Hi Sean,
What's the issue you are having with it. I created the original Opayo payment provider before passing it over to Vendr/Umbraco Commerce back for v8.
Thanks
Nik
Hi Nik
Thanks for the reply.
We're unsure how to use it.
I've tried calling Html.BeginPaymentFormAsync() but it doesn't generate a form or produce any markup.
Yeah, so that isn't the payment providers responsibility that is your implementation:
https://docs.umbraco.com/umbraco-commerce/key-concepts/payment-forms#example-payment-form
The payment provider only really interacts at the point of submitting your payment form, so you need to add in markup, such as a the submit button to make that form submit. If you don't do that, then you won't submit your payment form, which in turn won't redirect the user to the hosted payment page.
I've not got any code to hand unfortunately, but for "demo" purposes, I'd try putting the example from that link above onto the page and see what happens when you click the button.
Ok cool I'll have a look at that.
Ok thats is what I was already doing. I submit the form automatically using a bit of js.
For some reason the action of the form looks like this and just redirects to my 'fail' url. I don't see anything in the log.
That seems strange, so in v8 when I was using it (Vendr days)
The code I had output was:
The only difference from what I understand is the transition to Async.
Have you confirmed all the values for URL's are in the right place in the payment provider config in the back office?
I've never seen the form output a url to the cancel end point, that does seem odd.
ah, nvm, I see some issues in the opayo transaction log. i'm sending some bad data.
Well, it says 3011 : The NotificationURL format is invalid. However I have no control over the notification url I don't think.
This is what is in opayo's transaction log. notificationurl=https://localhost:44394/umbraco/commerce/payment/callback/opayo-server/a2f60eb7-4714-4017-af7c-018cd4657794/01465-32468-DG8M9/c2f91f73e95d244a8900a1fcc8383c723fc2f9a0
Opayo doesn't support localhost domains, you need to set up a legit domain such as a ngrok one or another public domain that routes back to the website as Opayo needs to be able to call back to the website to get data for the requests.
So that could well be what's going wrong as it's unable to establish the correct transaction routing, so UmbracoComerce detects this and presents the cancel url to the form instead of the redirect to Opayo.
Yeah that was the issue.
You wouldn't know how to change the description that is sent? I cannot see any settings for it.
It current shows this: Order description: Umbraco Commerce Order -
Hey Sean,
On the payment provider there is a setting called "OrderPropertyDescription" if you set this to the alias of a property on the order, you can then, in your code, set the description yourself, otherwise what you are seeing is the fallback default.
https://github.com/umbraco/Umbraco.Commerce.PaymentProviders.Opayo/blob/main/src/Umbraco.Commerce.PaymentProviders.Opayo/Helpers/OpayoInputLoader.cs
Thanks
Nik
Hi Nik, yeah I found it, thanks!
That did occur to me, i'll use a real domain and see how that works. Thanks for the help!
is working on a reply...