Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • seanrock 262 posts 483 karma points
    Jan 04, 2024 @ 08:35
    seanrock
    0

    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.

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Jan 04, 2024 @ 10:18
    Nik
    0

    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

  • seanrock 262 posts 483 karma points
    Jan 04, 2024 @ 11:17
    seanrock
    0

    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.

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Jan 04, 2024 @ 16:05
    Nik
    0

    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.

  • seanrock 262 posts 483 karma points
    Jan 05, 2024 @ 07:06
    seanrock
    0

    Ok cool I'll have a look at that.

  • seanrock 262 posts 483 karma points
    Jan 05, 2024 @ 09:17
    seanrock
    0

    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.

    https://localhost:44394/umbraco/commerce/payment/cancel/opayo-server/a2f60eb7-4714-4017-af7c-018cd4657794/01465-32468-DG8M9/98992939b06cc8ebf7e96805fb994688240a97ab
    
  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Jan 05, 2024 @ 09:32
    Nik
    0

    That seems strange, so in v8 when I was using it (Vendr days)

    The code I had output was:

    @using (Html.BeginPaymentForm(order))
    {
          <button class="button __icon2 __iconlg"><i class="icon-lock"></i>Checkout securely</button>
    }
    

    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.

  • seanrock 262 posts 483 karma points
    Jan 05, 2024 @ 09:32
    seanrock
    0

    ah, nvm, I see some issues in the opayo transaction log. i'm sending some bad data.

  • seanrock 262 posts 483 karma points
    Jan 05, 2024 @ 09:38
    seanrock
    0

    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

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Jan 05, 2024 @ 09:42
    Nik
    0

    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.

  • seanrock 262 posts 483 karma points
    Jan 05, 2024 @ 13:53
    seanrock
    0

    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 -

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Jan 08, 2024 @ 13:47
    Nik
    0

    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

  • seanrock 262 posts 483 karma points
    Jan 08, 2024 @ 13:49
    seanrock
    0

    Hi Nik, yeah I found it, thanks!

  • seanrock 262 posts 483 karma points
    Jan 05, 2024 @ 09:44
    seanrock
    0

    That did occur to me, i'll use a real domain and see how that works. Thanks for the help!

Please Sign in or register to post replies

Write your reply to:

Draft