I have a test site and a production site. On the test site all works fine when paying with a sandbox Paypal account. On my production site I get a #schedConf.registration.landingUnpaid## displayed with either the sandbox or a real Paypal account.
The test site is on a different server to the production site. Just tested prod site using sandbox and it too gets unpaidLanding. So its prob something I have not set on the production site.
The apache log does not show any errors during a sandbox transaction. Any suggestions on where I should look, maybe some configuration thing I have missed? Help appreciated.
Thanks for your order
test, you've just completed your payment.
Your transaction ID for this payment is: 70123621CG036392L.
We'll send a confirmation email to xxxxx
Click return to text facilitators store
On production I get two Paypal IPN hits but only one using the test site.
The production (https) shows session info, the test site (not https) does not. The apache logs are quite different.
Something to do with https versus http ?
If you see two hits to your production site for a single transaction, it suggests to me that the first time wasn’t successful so PayPal is trying again. Depending on your server configuration, you may need to explicitly set the SSL version. Try adding to every set of curl_setopt calls in plugins/paymethod/paypal/PayPalPlugin.inc.php…
Thanks for this lead. I looked in the php error log (php5-fpm.log) but its pretty empty of errors.
Added the line to set the ssl version to PayPalPlugin.inc.php and restarted apache and tried again but same error: unpaidLanding.
Downloaded the TlsCheck.php and ran that and got OK
Have solved the problem. My silly mistake.
The error was:
173.0.82.126 “POST /index.php/uis/speleo2017/payment/plugin/Paypal/ipn HTTP/1.1” 401 3669 “-” "PayPal IPN
Note the 401. This is an Authorization Required error:
“This means that the page requires that the visitors authenticate with their username and password. If they fail to do that, the server returns this error message.”
I have protected the site with a simple basic auth username and password so it cant be accessed before it goes live !
Once I removed that (temporarily just to test) it all works.
Thanks and sorry for the question that was my error. At least I now know from reading many posts a bit more about how OCS and Paypal interact.