Les meilleurs développeurs Prestashop freelances sont sur Codeur.com

Debug error 500 prestashop module checkout

 Fermé · Moins de 500 € · 4 offres · 1550 vues · 10 interactions


Hello

I need a debug on validate order from new PS module prestashop checkout. Not the time to see that with the Prestashop team, so i just need a debug.

Bonjour, j'ai besoin d'un debug qui semble venir d'un conflit entre Prestashop checkout et un autre module.

This is the error displayed :

[PrestaShopException]
Property OrderPayment->amount is not valid
at line 909 in file classes/ObjectModel.php

904. }
905.
906. $message = $this->validateField($field, $this->$field);
907. if ($message !== true) {
908. if ($die) {
909. throw new PrestaShopException($message);
910. }
911. return $error_return ? $message : false;
912. }
913. }
914.
ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php]
241. * [Email visible pour les membres Pro] array All object fields
242. * [Email visible pour les membres Pro] PrestaShopException
243. */
244. public function getFields()
245. {
246. $this->validateFields();
247. $fields = $this->formatFields(self::FORMAT_COMMON);
248.
249. // For retro compatibility
250. if (Shop::isTableAssociated($this->def['table'])) {
251. $fields = array_merge($fields, $this->getFieldsShop());
ObjectModelCore->getFields - [line 652 - classes/ObjectModel.php]
647.
648. if (Shop::checkIdShopDefault($this->def['table']) && !$this->id_shop_default) {
649. $this->id_shop_default = (in_array(Configuration::get('PS_SHOP_DEFAULT'), $id_shop_list) == true) ? Configuration::get('PS_SHOP_DEFAULT') : min($id_shop_list);
650. }
651. // Database update
652. if (!$result = Db::getInstance()->update($this->def['table'], $this->getFields(), '`'.pSQL($this->def['primary']).'` = '.(int)$this->id, 0, $null_values)) {
653. return false;
654. }
655.
656. // Database insertion for multishop fields related to the object
657. if (Shop::isTableAssociated($this->def['table'])) {
ObjectModelCore->update - [line 445 - classes/ObjectModel.php] - [1 Arguments]
440. * [Email visible pour les membres Pro] bool Insertion result
441. * [Email visible pour les membres Pro] PrestaShopException
442. */
443. public function save($null_values = false, $auto_date = true)
444. {
445. return (int)$this->id > 0 ? $this->update($null_values) : $this->add($auto_date, $null_values);
446. }
447.
448. /**
449. * Adds current object to the database
450. *
ObjectModelCore->save - [line 203 - modules/ps_checkout/classes/ValidateOrder.php]
198. return false;
199. }
200. $payment = new \OrderPayment($orderPayment->id);
201. $payment->transaction_id = $transactionId;
202.
203. return $payment->save();
204. }
205.
206. /**
207. * Set the status of the prestashop order if the payment has been
208. * successfully captured or not
PrestaShop\Module\PrestashopCheckout\ValidateOrder->setTransactionId - [line 142 - modules/ps_checkout/classes/ValidateOrder.php] - [2 Arguments]
137. $payload['paymentMethod']
138. );
139.
140. if ($orderState === _PS_OS_PAYMENT_) {
141. // [Email visible pour les membres Pro] this may be useless, previous $module->validateOrder() should save transaction id
142. $this->setTransactionId($module->currentOrderReference, $response['body']['id']);
143. }
144.
145. return true;
146. }
147.
PrestaShop\Module\PrestashopCheckout\ValidateOrder->validateOrder - [line 83 - modules/ps_checkout/controllers/front/ValidateOrder.php] - [1 Arguments]
78. 'secureKey' => $customer->secure_key,
79. ];
80.
81. // If the payment is rejected redirect the client to the last checkout step (422 error)
82. // API call here
83. if (false === $payment->validateOrder($dataOrder)) {
84. $this->redirectToCheckout(['hferror' => 1]);
85. }
86.
87. /** [Email visible pour les membres Pro] PaymentModule $module */
88. $module = $this->module;
ps_checkoutValidateOrderModuleFrontController->postProcess - [line 178 - classes/controller/Controller.php]
173. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
174. $this->setMedia();
175. }
176.
177. // postProcess handles ajaxProcess
178. $this->postProcess();
179.
180. if (!empty($this->redirect_after)) {
181. $this->redirect();
182. }
183.
ControllerCore->run - [line 335 - override/classes/Dispatcher.php]
330. try
331. {
332. $controller = Controller::getController($controller_class);
333. if (isset($params_hook_action_dispatcher))
334. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
335. $controller->run();
336. if ($this->_isPageCacheActive())
337. {
338. PageCache::displayStats(false, $pre_display_html);
339. }
340. }
Dispatcher->dispatch_16 - [line 107 - override/classes/Dispatcher.php]
102. * date: [Téléphone visible pour les membres Pro]:13:42
103. * version: 4.60
104. */
105. public function dispatch() {
106. if (Tools::version_compare(_PS_VERSION_,'1.6','>=')) {
107. $this->dispatch_16();
108. } else {
109. $this->dispatch_15();
110. }
111. }
112. /*
Dispatcher->dispatch - [line 28 - index.php]
23. * [Email visible pour les membres Pro] [URL visible pour les membres Pro] Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26.
27. require(dirname(__FILE__).'/config/config.inc.php');
28. Dispatcher::getInstance()->dispatch();

Budget indicatif : Moins de 500 €

Publication : 02 mai 2020 à 09h35

Profils recherchés : Développeur Prestashop freelance , Développeur PHP freelance

Le profil du client est reservé aux prestataires abonnés

Créer un compte

4 freelances ont répondu à ce projet

4 propositions de devis en moins de 2h

Med Kh Développeur Prestashop
TouchWeb Spécialiste infogérance
PRESEO Agence de développement e-commerce
Viking Production Agence web
Publier un projet similaire

Chaque jour, des centaines de clients utilisent Codeur.com pour trouver un prestataire. Créez votre compte dès maintenant, remplissez votre profil et trouvez de nouveaux clients.

Trouver des nouveaux clients