We have wired up our Opayo provider with Vendr v2 (on Umbraco 9) and currently can't process any payments.
Upon taking the card details Opayo tries to redirect back to the Vendr site.
We receive the following error:
![Screenshot 2021-10-14 at 21 41 19](https://user-images.githubusercontent.com/16511093/137392283-62f6dff1-e080-4b6d-a00c-df5fea7bc998.png)
This is because the callback URL that Vendr returns throws a 500 error.
I have investigated and found the error is a null reference, in CallbackRequestModel.FromRequestAsync
the request
parameter is null... Further digging brought me to looking at PaymentProviderContext
in the Vendr Core, which has 2 internal constructors: one that takes a request, and one that passes null
through for the request instead. The base payment provider uses the constructor without request and therefore the payment provider goes💥 when it calls ProcessCallbackAsync
.
Previously in Vendr V1 the request was passed in to ProcessCallback
as a parameter.