Copied to clipboard

Flag this post as spam?

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


  • Bo Jacobsen 606 posts 2404 karma points
    Feb 24, 2022 @ 14:30
    Bo Jacobsen
    0

    Vendr QuickPay empty uri

    Hi Matt.

    We are using Vendr.Contrib.PaymentProviders.QuickPay 1.1.0 with Vendr 1.8.6 and when we try to use Html.BeginPaymentForm(OrderReadOnly) then we get 2 errors.

    The first error that's logged is System.UriFormatException: Invalid URI: The URI is empty.

    The next error is System.AggregateException: One or more errors occurred. ---> Flurl.Http.FlurlHttpException: Call failed with status code 400 (Bad Request): POST https://api.quickpay.net/payments

    So i searched the net and found this post https://our.umbraco.com/packages/website-utilities/vendr/vendr-support/106226-invalid-uri-the-uri-is-empty-in-payment-form where you mention that the URI should come from the payment provider and if this is returning an empty URI, my guess is that something in the payment provider is miss-configured such that the gateway isn't returning an expected result. I'd double check your configuration and maybe check the payment providers gateway to see if it can tell you what the issue is.

    So i checked the configuration in Umbraco and contacted QuickPay to work out a solution. But they could not see anything wrong and would need the data we try send to them, because they do not log anything.

    So i tried to capture the post request to https://api.quickpay.net/payments, but i cant, neither from LIVE or Local with Fiddler, Postman or Chrome plugins.

    So my guess is that its not posting anything and must return an empty URI for another reason.

    But what could that other reason be?

  • Bo Jacobsen 606 posts 2404 karma points
    Feb 25, 2022 @ 09:18
    Bo Jacobsen
    100

    It was the order number length. How stupid could i be...

  • Cecilie Espensen 2 posts 22 karma points
    Feb 25, 2022 @ 10:44
    Cecilie Espensen
    0

    Hi Bo

    How did you solve it then?

  • Cecilie Espensen 2 posts 22 karma points
    Feb 25, 2022 @ 11:19
    Cecilie Espensen
    0

    Hi again

    We found a solution that works for us - downgraded Vendr to 1.8.5. Seems the change in 1.8.6 with the 'updated the default order number generator' was causing the issue.

  • Michael Nielsen 154 posts 811 karma points
    Feb 25, 2022 @ 12:24
    Michael Nielsen
    0

    I've just encountered the same error on a site also.

    The site is already running Vedr 1.8.6, and I'm replacing

    Vendr.PaymentProviders.Dibs 1.1.0 (Obsolete DIBS D2 payment gateway)

    with

    Vendr.Contrib.PaymentProviders.Nets 1.0.1 (new Nets Easy payment gateway)

    With Cecilies experience in mind, I'm looking at the changelog for Vendr 1.8.6

    https://vendr.net/docs/core/changelog/#v186

    Where there's a change to the following:

    Updated the default order number generator to improve randomness and thus prevent collisions, especially in load balanced environments.

    Is there perhaps something shared in Vendr.Contrib.PaymentProviders, that does not like the above change?

  • Bjarne Fyrstenborg 1284 posts 4018 karma points MVP 8x c-trib
    Feb 25, 2022 @ 15:57
    Bjarne Fyrstenborg
    0

    The issue with QuickPay was that the default order number generator in Vendr previously generated ORDER-XXXX-XXXX-XXXX (20 characters), but from v1.8.6 https://vendr.net/docs/core/changelog/#v186 it is now generating ORDER-XXXXX-XXXXX-XXXXX (23 characters).

    However QuickPay require a unique order id, which must be between 4-20 characters, so the default is too long. QuickPay has discussed internal to increase this, but so far still limited to 20 characters.

    In v2 this is handled, so it trim any prefix and suffix from the generated order number, but we should probably release a patch update for v1 as well.

    Regarding Nets Easy this shouldn't be an issue which default order number, but docs here https://tech.dibspayment.com/easy/api/datastring-parameters says it is limited to 27 characters.

  • Michael Nielsen 154 posts 811 karma points
    Feb 28, 2022 @ 12:31
    Michael Nielsen
    0

    Hi Bjarne

    Then it's a different issue I'm having, it is however, the exact same error message.

  • Bjarne Fyrstenborg 1284 posts 4018 karma points MVP 8x c-trib
    Feb 28, 2022 @ 16:04
    Bjarne Fyrstenborg
    0

    Hi Michael

    I guess the issue is regarding v1 of Nets Easy payment provider?

    Regarding the error System.AggregateException: One or more errors occurred. ---> Flurl.Http.FlurlHttpException: Call failed with status code 400 (Bad Request)which is thrown here https://github.com/vendrcontrib/vendr-payment-provider-nets/blob/v1/main/src/Vendr.Contrib.PaymentProviders.Nets/Easy/Api/NetsEasyClient.cs#L81 and logged here. https://github.com/vendrcontrib/vendr-payment-provider-nets/blob/v1/main/src/Vendr.Contrib.PaymentProviders.Nets/Easy/NetsEasyOneTimePaymentProvider.cs#L420

    As I recall it doesn't log the full stack trace error from Flurl, but there could be a few reasons to the request could fail:

    • Sum of order lines doesn't match + discounts + gift cards + other price adjustments doesn't match total amount.
    • Phone number and prefix isn't a valid format e.g. +45 (including + in prefix). Phone number is optional, but when used both prefix and number is required. Currently this split value from BillingPhonePropertyAlias property and use 3 first characters as prefix and the remaining characters in number. https://developers.nets.eu/nets-easy/en-EU/api/#country-codes-and-phone-prefixes
    • termsUrl property is required
  • Michael Nielsen 154 posts 811 karma points
    Mar 01, 2022 @ 08:04
    Michael Nielsen
    0

    Hi Bjarne

    Yes, I get the System.UriFormatException: Invalid URI: The URI is empty. error on using (Html.BeginPaymentForm(order)) with v1.0.1.

    I've created an issue here

    https://github.com/vendrcontrib/vendr-payment-provider-nets/issues/4

Please Sign in or register to post replies

Write your reply to:

Draft