I have installed the Adyen addon to support swish payments. I used the downloadable files from the documentation to implement the addon functionality.
The GetWidget method in AdyenPaymenyWidgetController.cs requires a Controller object as an argument. Our paymentmethodviewmodelbuilder does not pass a controller object to this method, only the current ordercarrier and paymentinfo.
Can I get the required Origin property value (as seen in the image above) without the controller object? Or do I have to somehow refactor the call to getwidget to include it?
This code is for previous to V7, as reference to KlarnaPaymentWidgetV2 or V3 you do not use Controller as parameter.
Ex.
var urlHelper = new UrlHelper(HttpContext.Current.Request.RequestContext);
var channelUri = new Uri(_urlService.GetUrl(_requestModelAccessor.RequestModel.ChannelModel.Channel, new ChannelUrlArgs() { AbsoluteUrl = true }));
I encountered a follow up issue after your code above worked well.
The adyen api seems to expect the PaymentProviderName to be “SE AdyenCheckout”, when it is, in fact “SE AdyenPayment”, leading to the following error when the code is trying to call adyenApi.CreateOrUpdateOrderCarrier(orderCarrier);
The call throws:
“Payment info was not found. Expected PaymentProviderName = Adyen, PaymentMethodName=SE AdyenCheckout”
I checked the paymentprovidername and it is “SE AdyenPayment”.
I’m a bit at a loss on this. Is it a bug or am I missing something?