Page 1 of 1

PayPal express setup

Posted: Wed May 20, 2015 6:48 am
by gzemlyakov
Hello,

I am trying to set up checkout with PayPal according to this guide http://www.broadleafcommerce.com/docs/paypal/current/.

I successfully run Broadleaf demo site after changes from this guide. But I got an error when I try to open cart which contains some products with the following stacktrace:

Caused by: java.lang.IllegalArgumentException: host parameter is null
at org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:206)
at org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:155)
at org.apache.commons.httpclient.SimpleHttpConnectionManager.getConnectionWithTimeout(SimpleHttpConnectionManager.java:175)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.broadleafcommerce.payment.service.gateway.AbstractPayPalExpressService.communicateWithVendor(AbstractPayPalExpressService.java:84)
at org.broadleafcommerce.payment.service.gateway.AbstractPayPalExpressService.communicateWithVendor(AbstractPayPalExpressService.java:60)
at org.broadleafcommerce.common.payment.service.AbstractExternalPaymentGatewayCall.process(AbstractExternalPaymentGatewayCall.java:76)
... 139 more

I've also attached txt file with full stacktrace. Thanks in advance for any help.

Re: PayPal express setup

Posted: Wed May 20, 2015 2:53 pm
by phillipuniverse
Did you set up the system properties as indicated at http://www.broadleafcommerce.com/docs/p ... ment-setup? And which version of the paypal module are you using?

Re: PayPal express setup

Posted: Fri May 22, 2015 10:20 am
by gzemlyakov
I didn't fully setup properties from http://www.broadleafcommerce.com/docs/p ... ment-setup.
Now everything is working. Thanks a lot for help!

Re: PayPal express setup

Posted: Mon Apr 25, 2016 4:11 pm
by eparst
Hello,

I have following error when running behind Nginx:

Error during execution of processor 'org.broadleafcommerce.vendor.paypal.web.processor.PayPalExpressCheckoutLinkProcessor' (cart/cart:31)] with root cause
java.lang.IllegalArgumentException: host parameter is null
at org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:206)
at org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:155)
at org.apache.commons.httpclient.SimpleHttpConnectionManager.getConnectionWithTimeout(SimpleHttpConnectionManager.java:175)
....

The part of my nginx.conf:
...
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Server-Proto $server_protocol;
proxy_set_header X-Url-Scheme $scheme;
proxy_connect_timeout 240;
proxy_send_timeout 240;
proxy_read_timeout 240;
proxy_redirect off;
}
...
Without nginx checkout with PayPal work fine.

I would be very grateful for help,

Vitaly