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.
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.
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.
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
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?
It was the order number length. How stupid could i be...
Hi Bo
How did you solve it then?
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.
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:
Is there perhaps something shared in Vendr.Contrib.PaymentProviders, that does not like the above change?
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 generatingORDER-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.
Hi Bjarne
Then it's a different issue I'm having, it is however, the exact same error message.
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#L420As 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:
+45
(including+
in prefix). Phone number is optional, but when used bothprefix
andnumber
is required. Currently this split value fromBillingPhonePropertyAlias
property and use 3 first characters asprefix
and the remaining characters innumber
. https://developers.nets.eu/nets-easy/en-EU/api/#country-codes-and-phone-prefixestermsUrl
property is requiredHi Bjarne
Yes, I get the
System.UriFormatException: Invalid URI: The URI is empty.
error onusing (Html.BeginPaymentForm(order))
with v1.0.1.I've created an issue here
https://github.com/vendrcontrib/vendr-payment-provider-nets/issues/4
is working on a reply...