# Adyen GetWidget

**URL:** <https://forum.litium.com/t/adyen-getwidget/1096>\
**Category:** Questions\
**Tags:** accelerator, payment, litium-7\
**Created:** [September 13, 2019, 7:33am UTC](https://forum.litium.com/t/adyen-getwidget/1096 "2019-09-13T07:33:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![victaxel](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/victaxel/32/159_2.png) [@victaxel](https://forum.litium.com/u/victaxel)\
**Post date:** [September 13, 2019, 7:33am UTC](https://forum.litium.com/t/adyen-getwidget/1096/1 "2019-09-13T07:33:18Z")

</div>

Hi,

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.

The adyen getwidget looks like this:

 ![controller](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/a2f9443fcddef871a985919f517965f619d5a850.png)

My question is:

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?

Thank you!

Litium version: 7

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [September 13, 2019, 8:54am UTC](https://forum.litium.com/t/adyen-getwidget/1096/2 "2019-09-13T08:54:45Z")

</div>

This code is for previous to V7, as reference to KlarnaPaymentWidgetV2 or V3 you do not use Controller as parameter.  
Ex.

```auto
var urlHelper = new UrlHelper(HttpContext.Current.Request.RequestContext);
var channelUri = new Uri(_urlService.GetUrl(_requestModelAccessor.RequestModel.ChannelModel.Channel, new ChannelUrlArgs() { AbsoluteUrl = true }));

```

---

<div class="post-metadata">

**Author:** ![victaxel](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/victaxel/32/159_2.png) [@victaxel](https://forum.litium.com/u/victaxel)\
**Post date:** [September 18, 2019, 2:00pm UTC](https://forum.litium.com/t/adyen-getwidget/1096/3 "2019-09-18T14:00:04Z")

</div>

Hi,

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?

// Victor

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [September 19, 2019, 6:45am UTC](https://forum.litium.com/t/adyen-getwidget/1096/4 "2019-09-19T06:45:42Z")

</div>

Have you enabled the SDK checkout in the config file?

If HPP is enabled, you can select `SE AdyenPayment` as a payment option for the channel.  
If SDK is enabled, you can select `SE AdyenCheckout`.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [October 17, 2019, 6:45am UTC](https://forum.litium.com/t/adyen-getwidget/1096/5 "2019-10-17T06:45:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
