PHP7 Payment Module Zend Decode Error

    • 16 posts
    February 20, 2018 4:27 AM EST

    After 4.10 upgrade the payment module is broken. I am on PHP7. After clicking on:

    Billing > Transactions
    Billing > Settings
    Billing > Gateways

    I get the following error:

    Zend_Json_Exception: Decoding failed: Syntax error in /var/www/html/application/libraries/Zend/Json.php:97

    • Moderator
    • 6923 posts
    February 20, 2018 4:49 AM EST

    This can happen when an issue happens between the site and paypal. We can fix it via a database clear of the current paypal account details. You would then just have to add back the paypal info in admin. If you have support access. If you don't have support access and are good working in the database I can let you know the fix but since working in the database can be tricky, it's best if you have good knowledge of it before doing something like that.

    • 16 posts
    February 20, 2018 5:18 AM EST

    Please let me know the fix. I am used to working with databases. Maybe more people are experiencing this after update? So available fix is handy?

    • Moderator
    • 6923 posts
    February 20, 2018 5:27 AM EST

    It isn't the update. This happens periodically in support. I don't know the cause. I didn't ask the core developer that gave the fix. 

    This following warning is for those that might attempt this and don't know databases: WARNING! Altering the database can have adverse impacts on your site if you aren't familiar with databases.

    Disclaimer: You assume any risks when doing the following steps. Backup your database before working in it.

    Run the following query:

    UPDATE `engine4_payment_gateways` SET `config`= null WHERE `title` = 'PayPal';

    Fill in your PayPal gateway details again in admin panel.

    • 16 posts
    February 20, 2018 5:41 AM EST

    Thats it Donna! Works like a charm! Thanks..

    • Moderator
    • 6923 posts
    February 20, 2018 5:43 AM EST

    You're welcome.

  • Jim
    • 20 posts
    February 20, 2018 8:01 PM EST

    i have the same issue but running the code in sql did nothing. Here are my errors

     

    <pre>Zend_Json_Exception: Decoding failed in /websites/website/application/libraries/Zend/Json.php:99<br>Stack trace:<br>#0 /websites/website/application/libraries/Engine/Db/Table.php(213): Zend_Json::decode('\xFA\r\xBD\xEC\x1D\xCA\xFA\xDB\x92E\xF9\xC6#\xEB:...')<br>#1 /websites/website/application/modules/Payment/Model/DbTable/Gateways.php(89): Engine_Db_Table->_unserializeColumns(Array)<br>#2 /websites/website/application/libraries/Zend/Db/Table/Abstract.php(1392): Payment_Model_DbTable_Gateways->_fetch(Object(Zend_Db_Table_Select))<br>#3 /websites/website/application/modules/Payment/Form/Admin/Transaction/Filter.php(52): Zend_Db_Table_Abstract->fetchAll()<br>#4 /websites/website/application/libraries/Zend/Form.php(239): Payment_Form_Admin_Transaction_Filter->init()<br>#5 /websites/website/application/libraries/Engine/Form.php(138): Zend_Form->__construct(NULL)<br>#6 /websites/website/application/modules/Payment/controllers/AdminIndexController.php(50): Engine_Form->__construct()<br>#7 /websites/website/application/libraries/Zend/Controller/Action.php(516): Payment_AdminIndexController->indexAction()<br>#8 /websites/website/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('indexAction')<br>#9 /websites/website/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))<br>#10 /websites/website/application/modules/Core/Bootstrap.php(84): Zend_Controller_Front->dispatch()<br>#11 /websites/website/application/libraries/Engine/Application.php(160): Core_Bootstrap->run()<br>#12 /websites/website/application/index.php(223): Engine_Application->run()<br>#13 /websites/website/index.php(25): include('/websites/model...')<br>#14 {main}</pre>
    • Moderator
    • 6923 posts
    February 21, 2018 4:49 AM EST

    Hmmm. This has fixed any other site with this issue. You cleared cache? Using current version? No third party plugin? Payment plugin is updated (sometimes you need to check that the plugins all updated when you upgrade). 

  • Jim
    • 20 posts
    February 21, 2018 9:33 AM EST
    When I run he code in sql it brings back 0 results so I don’t think this did anything. I shared my error codes maybe you see something different?
    • Moderator
    • 6923 posts
    February 21, 2018 9:36 AM EST

    I don't know why it isn't working unless perhaps you have an older version; a plugin; or something else going on. Check your database for the payment gateways table and see if you have it. Otherwise, please submit a ticket if you have active support and we can check if your site is on a current version (4.10 or 4.9.4p4)

  • Jim
    • 20 posts
    February 21, 2018 9:47 AM EST

    just renamed the fo;der and did another clean install. still getting errors

     

    <pre>Error Code: 67e1b0 Zend_Json_Exception: Decoding failed in /websites//application/libraries/Zend/Json.php:99 Stack trace: #0 /websites//application/libraries/Engine/Db/Table.php(213): Zend_Json::decode('\xFA\r\xBD\xEC\x1D\xCA\xFA\xDB\x92E\xF9\xC6#\xEB:...') #1 /websites//application/modules/Payment/Model/DbTable/Gateways.php(89): Engine_Db_Table->_unserializeColumns(Array) #2 /websites//application/libraries/Zend/Db/Table/Abstract.php(1392): Payment_Model_DbTable_Gateways->_fetch(Object(Zend_Db_Table_Select)) #3 /websites//application/modules/Payment/controllers/AdminSettingsController.php(32): Zend_Db_Table_Abstract->fetchAll() #4 /websites//application/libraries/Zend/Controller/Action.php(516): Payment_AdminSettingsController->indexAction() #5 /websites//application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('indexAction') #6 /websites//application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 /websites//application/modules/Core/Bootstrap.php(84): Zend_Controller_Front->dispatch() #8 /websites//application/libraries/Engine/Application.php(160): Core_Bootstrap->run() #9 /websites/modeldesire/application/index.php(223): Engine_Application->run() #10 /websites/modeldesire/index.php(25): include('/websites/model...') #11 {main}</pre>


    This post was edited by Jim at February 21, 2018 9:48 AM EST
  • gs
    • 857 posts
    February 21, 2018 10:04 AM EST

    ==> '...This can happen when an issue happens between the site and paypal...'

    Shouldn't this be recoverable within SE?  I guess what I'm asking is why does something like this require a manual/database (or SE Support) fix?  Do other Apps linking to PayPal require the User to manually 'fix' an issue in a database? 

    • Moderator
    • 6923 posts
    February 21, 2018 10:05 AM EST

    All of your paths show double // in them. Not sure if that's from you editing out the sites.

    Check your permissions please. They should follow https://support.socialengine.com/php/customer/en/portal/articles/2777304-optimized-file-and-folder-permissions?b_id=14386 and need to be recursively set as the tutorial shows.

    What version are you using? What PHP version? If you have support, it might be a better option as it's harder to troubleshoot from here if everything else checks out.

    • Moderator
    • 6923 posts
    February 21, 2018 10:07 AM EST
    gs said:

    ==> '...This can happen when an issue happens between the site and paypal...'

    Shouldn't this be recoverable within SE?  I guess what I'm asking is why does something like this require a manual/database (or SE Support) fix?  Do other Apps linking to PayPal require the User to manually 'fix' an issue in a database? 

    I don't know. I just know that with anything computer related, sometimes there can be corrupt files or saved stuff. This can happen in any script for any different thing. I've seen it before in a different script with js files and with ajax needing to be reloaded. I cannot answer further as I have no further information about how this sort of thing happens. 

    • 275 posts
    March 30, 2018 9:34 AM EDT

    Thanks ! this worked