blockonomics / prestashop-plugin

Accept bitcoins on your website, payments go directly into your wallet
Other
16 stars 22 forks source link

[PrestaShop v8] Checkout is not working #157

Closed anktd closed 1 year ago

anktd commented 1 year ago

PS v8 is officially available. Checkout & Test Setup is not working with our latest plugin (v1.7.96). ps_v8_checkout_error

Checkout Error Log:

PHP Fatal error:  Uncaught Error: Call to undefined method Tools::jsonDecode() in C:\xampp\htdocs\prestashopv8\modules\blockonomics\blockonomics.php:300
Stack trace:
#0 C:\xampp\htdocs\prestashopv8\modules\blockonomics\blockonomics.php(255): Blockonomics->doCurlCall('https://www.blo...')
#1 C:\xampp\htdocs\prestashopv8\modules\blockonomics\controllers\front\payment.php(331): Blockonomics->getPrice('btc', 1)
#2 C:\xampp\htdocs\prestashopv8\modules\blockonomics\controllers\front\payment.php(117): BlockonomicsPaymentModuleFrontController->getBits(Object(Blockonomics), 'btc', Object(Currency), 47.25)
#3 C:\xampp\htdocs\prestashopv8\classes\controller\Controller.php(308): BlockonomicsPaymentModuleFrontController->postProcess()
#4 C:\xampp\htdocs\prestashopv8\classes\Dispatcher.php(503): ControllerCore->run()
#5 C:\xampp\htdocs\prestashopv8\index.php(28): DispatcherCore->dispatch()
#6 {main}
  thrown in C:\xampp\htdocs\prestashopv8\modules\blockonomics\blockonomics.php on line 300

Full testing sheet here ➡ https://docs.google.com/spreadsheets/d/1O3XqNhLElVpWXcMetFUl_AlEHpThWTpx9bvVPRedrgg/edit?usp=sharing

anktd commented 1 year ago

As per changelog , Tools::jsonDecode() deprecated in 1.7.0

Using json_decode here resolves the issue and checkout works fine.

chrome_N8TfflVCpS
DarrenWestwood commented 1 year ago

Fixed in https://github.com/blockonomics/prestashop-plugin/pull/158