Paypal not working in OJS3.1

Hi, Recently I have created my e-journal’s website with OJS 3.1 (Fresh installation).
I have configured my Distribution Settings> Payment > Paypal Payment Settings
Created a Rest API in Paypal and placed every detail under Account Name, Client ID and Secret. But the paypal payment is not working. Everytime when someone tries to make a purchase it shows a blank screen. Please help me. I there any problem with the Paypal plugin ? I have also used OJS 2.8 but there was no issues like this and everything was working fine.index1index

Hi @Rahul_Arora,

Is there anything in your PHP error log?

Best,
Amanda Stevens
Public Knowledge Project Team

Thank you so much for the response. On the firefox browser the purchase link leads to a blank screen. On Google Chrome message is : This page isn’t working www…com is currently unable to handle this request.
HTTP ERROR 500

Last 300 Error Log messages in reverse order:
[Fri Nov 24 13:16:36 2017] [error] [client 77.75.77.109] File does not exist: /home/socraowa/public_html/public/journals/1/cover_issue_20_en_US.jpg
[Fri Nov 24 13:16:16 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 13:15:20 2017] [error] [client 216.244.66.249] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 13:15:20 2017] [error] [client 216.244.66.249] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 13:13:05 2017] [error] [client 223.180.173.106] File does not exist: /home/socraowa/public_html/public/journals/1/cover_article_55_en_US.jpg, referer: https://www.google.co.in/
[Fri Nov 24 13:11:22 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 13:06:20 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 13:03:09 2017] [error] [client 194.51.204.208] File does not exist: /home/socraowa/public_html/public/journals/1/cover_article_55_en_US.jpg, referer: https://www.google.fr/blank.html
[Fri Nov 24 13:01:24 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 13:00:21 2017] [error] [client 173.252.124.19] File does not exist: /home/socraowa/public_html/e-Government
[Fri Nov 24 12:56:22 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:51:13 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:46:16 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:45:12 2017] [error] [client 66.249.64.23] File does not exist: /home/socraowa/public_html/js/inlinePdf.jsjs, referer: http://socratesjournal.com/index.php/socrates/article/view/254
[Fri Nov 24 12:45:12 2017] [error] [client 66.249.64.23] File does not exist: /home/socraowa/public_html/plugins/generic/roundedCorners, referer: http://socratesjournal.com/index.php/socrates/article/view/254
[Fri Nov 24 12:45:10 2017] [error] [client 66.249.64.22] File does not exist: /home/socraowa/public_html/public/journals/1/custom.csspublic, referer: http://socratesjournal.com/index.php/socrates/article/view/254
[Fri Nov 24 12:45:10 2017] [error] [client 66.249.64.22] File does not exist: /home/socraowa/public_html/plugins/generic/pln, referer: http://socratesjournal.com/index.php/socrates/article/view/254
[Fri Nov 24 12:45:09 2017] [error] [client 66.249.64.22] File does not exist: /home/socraowa/public_html/plugins/generic/externalFeed, referer: http://socratesjournal.com/index.php/socrates/article/view/254
[Fri Nov 24 12:41:20 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:38:41 2017] [error] [client 195.238.108.89] File does not exist: /home/socraowa/public_html/SOCRATES, referer: https://www.socratesjournal.com/SOCRATES/index.php/SOCRATES
[Fri Nov 24 12:36:17 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:31:26 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:31:20 2017] [error] [client 194.187.170.109] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 12:26:12 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:21:21 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:17:29 2017] [error] [client 77.75.76.167] File does not exist: /home/socraowa/public_html/public/journals/1/cover_issue_15_en_US.jpg
[Fri Nov 24 12:17:27 2017] [error] [client 77.75.76.167] File does not exist: /home/socraowa/public_html/public/journals/1/cover_article_213_en_US.jpg
[Fri Nov 24 12:16:23 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:12:17 2017] [error] [client 40.77.181.156] File does not exist: /home/socraowa/public_html/LiveSearchSiteAuth.xmlLiveSearchSiteAuth.xml
[Fri Nov 24 12:12:16 2017] [error] [client 40.77.181.156] File does not exist: /home/socraowa/public_html/bingsiteauth.xmlbingsiteauth.xml
[Fri Nov 24 12:12:16 2017] [error] [client 40.77.181.156] File does not exist: /home/socraowa/public_html/BingSiteAuth.xmlBingSiteAuth.xml
[Fri Nov 24 12:11:22 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:06:40 2017] [error] [client 40.77.167.66] File does not exist: /home/socraowa/public_html/public/journals/1/pageHeaderTitleImage_en_US.jpg
[Fri Nov 24 12:06:24 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 12:05:35 2017] [error] [client 216.244.66.202] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 12:05:35 2017] [error] [client 216.244.66.202] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 12:04:24 2017] [error] [client 100.43.90.200] File does not exist: /home/socraowa/public_html/public/journals/1/cover_article_198_en_US.jpgpublic
[Fri Nov 24 12:01:21 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 11:56:25 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 11:51:21 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 11:49:38 2017] [error] [client 216.244.66.249] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 11:46:39 2017] [error] [client 216.244.66.202] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 11:46:39 2017] [error] [client 216.244.66.202] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 11:46:21 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 11:41:19 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog
[Fri Nov 24 11:38:53 2017] [error] [client 47.195.251.227] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 11:38:26 2017] [error] [client 47.195.251.227] File does not exist: /home/socraowa/public_html/Guestbook
[Fri Nov 24 11:38:22 2017] [error] [client 47.195.251.227] File does not exist: /home/socraowa/public_html/robots.txtrobots.txt
[Fri Nov 24 11:36:20 2017] [error] [client 192.0.91.177] File does not exist: /home/socraowa/public_html/blogblog

Hi @Rahul_Arora,

At a glance, these errors do not seem related to the Paypal blank page problem. You could check to see that the error date and time corresponds with when you’re trying to access the Paypal payment.

Also this topic from a user who was having problems with Paypal recommends downloading the latest ojs-stable-3_1_0 branch.

Best,
Amanda Stevens
Public Knowledge Project Team

Thank you for the prompt response.
Can you please guide How to download and install the latest ojs-stable-3_1_0 branch ?
I have already installed the current version of OJS on my e-journal’s website. Should I remove my current installation and install the latest ojs-stable-3_1_0 branch ? I have downloaded the latest ojs-stable-3_1_0 branch zip folder from git.

Hi @Rahul_Arora,

Are you sure you’re looking at your PHP error log, and not e.g. your Apache error log (which may or may not be the same thing)?

I see you’ve also asked on StackOverflow – there’s a recommendation there. Generally speaking it’s better to post in one place (and I’d recommend this forum over StackOverflow, just because there are more OJS users here). Posting in multiple places divides the conversation.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @Rahul_Arora,

You’ll definitely need access to your PHP error log to debug problems – OJS is not rare in this regard and it’s very uncommon for hosts not to provide it.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @astevens, I applied the latest ojs-stable-3_1_0 branch, which replaced my folders with the new folders. But my problem has not solved. Still same blank page. I am asking my hosting service to provide me with the PHP error_log. Regards

Hi @asmecher, I found this Error message on my payment page/on the blank screen <Fatal error: Interface ‘Symfony\Component\EventDispatcher\EventSubscriberInterface’ not found in /home/socraowa/public_html/plugins/paymethod/paypal/vendor/guzzle/guzzle/src/Guzzle/Http/RedirectPlugin.php on line 20> . When someone clicks ‘Purchase’ button the screen gets blank (I have already discussed problem on my OJS3.1 website). What should I do ? Regards

Edit: On an simmilar issue https://github.com/pkp/pkp-lib/issues/2996 you have suggested: To resolve this in OJS 3.1.0, apply this patch, then
cd plugins/paymethod/paypal
composer update

I have already done that, but the issue has not solved. Same blank screen when someone clicks the payment button on my subscription page.
Please suggest… Best regards

Edit: This is error message on my Home screen <Deprecated: Non-static method Config::getContextBaseUrls() should not be called statically, assuming $this from incompatible context in /home/socraowa/public_html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 199>

Hi @Rahul_Arora,

The Deprecated warning is cosmetic, but make sure your system is configured to send error messages to your log file rather than the web browser. Otherwise these messages may interfere with AJAX subrequests. (This is recommended for production use anyway).

Look for a log message in your PHP error log that contains Error in it.

Regards,
Alec Smecher
Public Knowledge Project Team

I have asked my web hosting provider for PHP error logs.

Hi @Rahul_Arora,

Try triggering the error again, and looking in the log immediately afterwards. Watch for a message containing the word “Error”, rather than a warning like those posted above.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher I triggered the error again and here are the PHP error logs:

[26-Nov-2017 16:32:09 Etc/GMT] PHP Fatal error: Interface ‘Symfony\Component\EventDispatcher\EventSubscriberInterface’ not found in /home/socraowa/public_html/plugins/paymethod/paypal/vendor/guzzle/guzzle/src/Guzzle/Http/RedirectPlugin.php on line 20

Hi @Rahul_Arora,

This is the same issue I originally directed you to. How did you try to resolve it?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @Rahul_Arora,

Does plugins/paymethod/paypal/vendor/symfony/event-dispatcher/EventSubscriberInterface.php exist in your installation? If not, then something went wrong when you tried to run composer update. Try it again, and post the full output here.

I would suggest returning your code to the state it was in before you started working with the git repository – I suspect this has unnecessarily confused things. You should be able to work with the tarball, and then apply the patch to add the composer dependency, and not require other changes (beyond running composer update as noted above).

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher I have checked my c-panel file manager plugins/paymethod/paypal/vendor/symfony/event-dispatcher/EventSubscriberInterface.php does not exist in my installation.

Edit: public_html/plugins/paymethod/paypal/vendor/symfony folder contains only two folders : http-foundation and polyfill-mbstring. event-dispatcher/ eventSubscriberInterface.php is missing. Please suggest. Regards

Hi @Rahul_Arora,

The missing files mean that something went wrong when you tried to run the composer update. Try again, and post the output here.

Regards,
Alec Smecher
Public Knowledge Project Team

How to run the composer update ? Should I copy this patch and replace the existing code on composer.jsn >> then save ?? {
“require”: {

  •   "symfony/event-dispatcher" : "~2.7",
      "omnipay/paypal": "~2.0"
    
    }
    }

Simmilarly with the composer.lock with the remaining code https://github.com/pkp/ojs/commit/f65db2759038a7e7e15e75fab010a6896b6f6207.diff

Please guide how to update composer ?

Hi @Rahul_Arora,

See e.g. step 4 at https://www.codementor.io/jadjoubran/php-tutorial-getting-started-with-composer-8sbn6fb6t.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher I am unfortuately disappointed by the OJS. Why can’t you guys create a stable and working OJS software (like wordpress or drupel)? Most of the OJS installations have problems and we are not software or coding experts. We removed our previous installation of OJS 2.8 thinking that OJS 3.1 is a more advanced and useful version of OJS for our e-journal. But unfortuately it is not. I am sorry but I do not know and understand how to do this <See e.g. step 4 at https://www.codementor.io/jadjoubran/php-tutorial-getting-started-with-composer-8sbn6fb6t>

Regards