Description
Hi Matt,
We recently upgraded to Umbraco 11 and our PayPal payment method has stopped working.
When the PayPal checkout flow is complete and the user is redirected back to our site, the order is placed in a kind of limbo state where it's cleared from the current order, but still classed as a cart.
Having checked the logs it seems PayPal is unable to get the order refernece (see error below). I've done some digging and think it could possibly be related to a breaking change introduced in dot net 7, so the jump to Umbraco 11 probably caused that, but I'm not 100% certain just yet.
I've forked a copy of the repo to continue my digging but I thought I'd raise the issue incase it's something you're already aware of and / or have a fix for.
We're using the following versions:
Umbraco: 11.3.1
Vendr: 3.0.11
Vendr.PaymentProviders.PayPal: 2.0.1
Here's the full error:
PayPal - GetOrderReference
System.ArgumentException: The value cannot be null or empty. (Parameter 'mediaType')
at System.Net.Http.Headers.MediaTypeHeaderValue.CheckMediaTypeFormat(String mediaType, String parameterName)
at Flurl.Http.Content.CapturedStringContent..ctor(String content, Encoding encoding, String mediaType)
at Flurl.Http.GeneratedExtensions.PostStringAsync(IFlurlRequest request, String data, CancellationToken cancellationToken, HttpCompletionOption completionOption)
at Vendr.PaymentProviders.PayPal.Api.PayPalClient.<>c__DisplayClass12_0.<<ParseWebhookEventAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Vendr.PaymentProviders.PayPal.Api.PayPalClient.RequestAsync[TResult](String url, Func`2 func)
at Vendr.PaymentProviders.PayPal.Api.PayPalClient.ParseWebhookEventAsync(HttpRequestMessage request)
at Vendr.PaymentProviders.PayPal.PayPalPaymentProviderBase`1.GetPayPalWebhookEventAsync(PayPalClient client, PaymentProviderContext`1 ctx)
at Vendr.PaymentProviders.PayPal.PayPalCheckoutOneTimePaymentProvider.GetOrderReferenceAsync(PaymentProviderContext`1 ctx)
As always any help is greatly appreciated!