Problem with PayPal add-on

Good afternoon!

I installed Litium.Studio.AddOns.PayPal and Litium.Studio.AddOns.PayPal.UI ver 4.7.101 according to instructions in https://docs.litium.com/documentation/add-ons/payments/paypal/install
I added PayPal as payment method on the channel (PayPal: SE EXPRESS_CHECKOUT).

In checkout I get an error when submitting, “Ett fel inträffade, vänligen försök igen.” and log complains about log4net missing:

2019-04-23 11:52:27.9124 [App:13] [13e0f88b-3f46-4cb0-9901-1f241c9b3ae2] [ERROR] [] Litium.Accelerator.Mvc.Controllers.Api.CheckoutController - Error when placing an order System.ComponentModel.Design.CheckoutException (0x80004005): Ett fel inträffade, vänligen försök igen., CheckOutExternalMessage: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The system cannot find the file specified. ---> Litium.Foundation.Modules.ECommerce.Plugins.Payments.PaymentProviderException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The system cannot find the file specified.
   at com.paypal.sdk.profiles.BaseAPIProfile..ctor()
   at Litium.Studio.AddOns.PayPal.PayPalAPI.InitializeRequest(NVPCallerServices caller)
   at Litium.Studio.AddOns.PayPal.PayPalAPI.SetExpressCheckout(PaymentAction paymentAction, OrderParams orderParams, String returnURL, String cancelURL, String language, String& redirectUrl)
   at Litium.Studio.AddOns.PayPal.PayPalProvider.ReserveMoneyFromCustomerAccount(PayPalExecutePaymentArgs paymentArgs, String& redirectUrl, PayPalExecutePaymentResult executePaymentResult, SecurityToken token)
   at Litium.Studio.AddOns.PayPal.PayPalProvider.ExecutePayment(ExecutePaymentArgs args, SecurityToken token)
   at Litium.Foundation.Modules.ECommerce.Payments.PaymentInfo.ExecutePayment(CheckoutFlowInfo checkoutFlowInfo, SecurityToken token)
   --- End of inner exception stack trace ---
   at Litium.Foundation.Modules.ECommerce.Payments.PaymentInfo.ExecutePayment(CheckoutFlowInfo checkoutFlowInfo, SecurityToken token)
   at Litium.Accelerator.Services.CheckoutServiceImpl.PlaceOrder(CheckoutViewModel model, String responseUrl, String cancelUrl, String& redirectUrl) in C:\git\DynamicCode2\Src\Litium.Accelerator\Services\CheckoutServiceImpl.cs:line 217
   at Litium.Accelerator.Services.CheckoutServiceImpl.PlaceOrder(CheckoutViewModel model, String responseUrl, String cancelUrl, String& redirectUrl) in C:\git\DynamicCode2\Src\Litium.Accelerator\Services\CheckoutServiceImpl.cs:line 228
   at Litium.Accelerator.Mvc.Controllers.Api.CheckoutController.PlaceOrder(CheckoutViewModel model) in C:\git\DynamicCode2\Src\Litium.Accelerator.Mvc\Controllers\Api\CheckoutController.cs:line 66

Litium version: 7.1.0

Just to be 100 percent sure – you did download the zipped log4net.dll on step 5?

No, my bad. I must have used these instructions where there is no step 5.
https://docs.litium.com/add-ons/payment-providers/paypal
Thanks!

Nice catch! Updated the documentation now :slight_smile:

1 Like

Thanks again! :slight_smile:

1 Like

I tried it now, it works, I’m being redirected to PayPal. But after payment when redirected back to site
kassa.HandleResponse?Type=Response&token=EC-71C31525XD957220A&PayerID=GLDPCYRZVW3RA
I only see a blank page.

When I debug CheckoutController.cs in method HandleResponse it looks like callBackResult is null
var callBackResult = _requestModelAccessor.RequestModel.Cart.PaymentProviderCallbackResult;

Any ideas of how to proceed with debugging?

Found it, changed to headlessCheckout=“false” in Litium.Studio.AddOns.PayPal.dll.config, works fine now!
(default is true after installing add-on)