PayPal Gateway Disappeared

Hi Hillel,

I am self hosting using version 4.4.1 on apache and Php 7.2 and have been using PayPal successfully for a couple of years. But a client just notified that it didn’t work. Not sure when it failed as I don’t have a lot of clients that use it.

I checked and sure enough the gateway wasn’t there anymore in my settings. I tried to add my API credentials back to the PayPal gateway setup, But it totally disappeared after saving the settings! Now I can’t even get back to those settings, only options available are bitpay and dwola under more options.

Please advise and thanks in advance.

I’m not sure, did anything change?

Are you using Braintree?

I was using PayPal Express before. But like I said, almost all of the gateway options including Braintree are gone now, only bitpay and dwola under more options are listed. They were there a couple of hours ago, then disappeared when I clicked save.

I moved server hardware a couple of months ago and updated to php 7.2, but everything seemed to be working fine.

I may try to update to the latest version and see if that fixes it, unless you have a better idea or how to troubleshoot it.

Thanks again.

If you add a credit card gateway the other options are hidden.

If you aren’t using token billing you may want to archive all of the payment gateways and then add them back. Or you could try testing in a new blank company.

I don’t use token billing, but there is also nothing to archive. And the online payments -> add gateway -> more options pop up menu is empty, no choices except for bitpay and diwola and gocardless. everything else has disappeared.

Just found a bunch of these in the larval-info.log:

[2018-06-21 19:51:51] development.INFO: Payment Error [paypal_express]: ErrorException [0] : /XXXXXXX/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php [Line 131] => openssl_decrypt(): IV passed is 32 bytes long which is longer than the 16 expected by selected cipher, truncating {“context”:“PHP”,“user_id”:0,“account_id”:0,“user_name”:"",“method”:“GET”,“user_agent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8”,“locale”:“en”,“ip”:“”,“count”:5,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“payment/wmn2r9swcmpmje9tzjiygsdn9lttlbaf/paypal”} []

From the error it looks like there may be a problem with APP_KEY or APP_CIPHER in the .env file.

When you moved from your previous server did you use the same .env file?

I don’t actually remember if I did or not, its possible I didn’t. I have backups and the old server, I will check to see, and if I didn’t, should I copy one the previous .env?

If you have the previous .env file that would be the easiest fix.

Otherwise, you can mark the records in the account_gateways table as deleted.

Ok I checked the original .env and the key is the same but the cipher is different. The original cipher is rijndael-256 but the current used one is AES-256-CBC. If update the cipher in the currently used env, but that results in a “whoops something went wrong” error loading the web page.

I guess I need go the other route to mark the records deleted in the accounts_gateway table? I have three entries in that table and in one the “deleted_at” field has a date over a year ago, and in the other two, the “deleted_at” just say NULL. One looks like a duplicate of the deleted one and the other was created when I tried to update the gateway a few days ago.

This is new to me, not sure how to mark them deleted. Any advise?

Thanks again for you help!

Here’s the SQL query to run

update account_gateways set deleted_at = now();

Success! that SQL query worked. Thank you so much!

Great to hear, thanks for letting us know!