Paypal not working in OJS3.1

Hi @Rahul_Arora,

OJS is free software and you’re relying on free support, but you’ll need to invest time in learning and stewardship on your part. If you don’t have the technical resources to manage an installation of OJS, there are many service providers out there who can assist.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @Rahul_Arora,

Composer is a standard tool and there are lots of good resources on how to use it online. Typically, you would log into your server via SSH and then run the commands to update the composer dependencies there.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher I logged into my server via SSH and tried to run command composer install and composer update. No result.

cd plugins/paymethod/paypal composer install

-bash: cd: plugins/paymethod/paypal: No such file or directory

cd plugins/paymethod/paypal/composer/install

-bash: cd: plugins/paymethod/paypal/composer/install: No such file or directory

cd plugins/paymethod/paypal/composer install

-bash: cd: plugins/paymethod/paypal/composer: No such file or directory

cd plugins/paymethos/paypal/composer update

-bash: cd: plugins/paymethos/paypal/composer: No such file or directory

Please guide…

Hi @Rahul_Arora,

You’re probably starting from the wrong directory when running cd plugins/paymethod/paypal. The other commands are wrong – cd doesn’t work that way.

If you’ve never worked with SSH or a Linux console before, I’d suggest finding an introductory guide. You’ll need to know some basics, and I’m afraid that’s outside the scope of this forum.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, I ran a few new codes on ssh

composer update
Composer could not find a composer.json file in /home/socraowa
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ “Getting Started” section

EDIT: [~]# /home/socraowa/www/plugins/paymethod/paypal/composer.json update
-bash: /home/socraowa/www/plugins/paymethod/paypal/composer.json: Permission denied

EDIT: [~]# /home/socraowa/www/plugins/paymethod/paypal/composer.lock update
-bash: /home/socraowa/www/plugins/paymethod/paypal/composer.lock: Permission denied

EDIT: [~]# /home/socraowa/www/plugins/paymethod/paypal/composer.json install
-bash: /home/socraowa/www/plugins/paymethod/paypal/composer.json: Permission denied

Hi @asmecher… php /home/socraowa/public_html/plugins/paymethod/paypal
composer install

Hi @asmecher, I have installed composer via SSH, php composer.phar
I have also replaced the codes in my paymethod/paypal/composer.js and composer.lock files as instructed by you here https://github.com/pkp/ojs/commit/f65db2759038a7e7e15e75fab010a6896b6f6207.diff
please guide me what are the next steps?

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.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher YES plugins/paymethod/paypal/vendor/symfony/event-dispatcher/EventSubscriberInterface.php exist and now the problem of blank page seems to have solved. but on that screen there is a message and payment is still not working : A transaction error occurred. Please contact the journal manager for details.

EDIT: LIVE API CREDENTIALS are working. SANDBOX API CREDENTIALS are not working.

EDIT: The issue of transaction error seems to have solved by using LIVE API CREDENTIALS in Paypal configuration.

Best Regards

Since I am also getting this white screen. I was trying to install this fix. https://jmri.org.in/jmri/article/view/e000086/114. I dont have plugins/paymethod/paypal/vendor/symfony/event-dispatcher/EventSubscriberInterface.php
Hi @asmecher I am trying to install composer, but I dont get ant reponse whether it has been installed or not.
image

Update, Was able to install it

Facing the same issue, with the latest fresh install of OJS. I suppose this patch is still not a part of the core.
Any way to apply this patch without the SSH access? I am on a shared host that prevents SSH access to the server. I have cpanel and FTP

If it helps, I installed the OJS3.1.1.2 from Softaculous installer, not sure if it is taking the latest version from the git?