Jump to content

Absence de l'ID de transaction Paypal PS 1.5


erehcab

Recommended Posts

Bonjour à tous,

 

j'utilise PS 1.5.2 avec le module de paiement Paypal 3.2.4. Les paiements sont bien interprétés / enregistrés mais dans le récapitulatif de la commande dans la section "Paiement" il ne m'affiche pas l'ID de transaction alors que pour un paiement Atos il est bien affiché. J'ai fouiné un peu et j'ai remarqué que dans la table order_payment il n'étais pas enregistré alors que dans la table paypal_order il est bien présent...

 

Quelqu'un à t'il le même problème que moi ?

Existe t'il une solution, patch à appliquer pour le résoudre ?

 

Merci !

Link to comment
Share on other sites

bon je viens de voir que le bug était déjà remonté :

 

http://forge.prestas...anel#issue-tabs

 

à priori la solution serait d'éditer le fichier paypal_1.5.php du module et d'y remplacer tout le code par ce code ci :

 

<?php
/*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 14390 $
*  @license	http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_PS_VERSION_'))
exit;
class PayPal extends PayPalAbstract
{
public function validateOrder($id_cart, $id_order_state, $amountPaid, $paymentMethod = 'Unknown', $message = null, $transaction = array(), $currency_special = null, $dont_touch_amount = false, $secure_key = false, Shop $shop = null)
{
 if ($this->active)
 {
  // Set transaction details if pcc is defined in PaymentModule class_exists
  if (isset($this->pcc))
$this->pcc->transaction_id = (isset($transaction['transaction_id']) ? $transaction['transaction_id'] : '');
  parent::validateOrder((int)$id_cart, (int)$id_order_state, (float)$amountPaid, $paymentMethod, $message, $transaction, $currency_special, $dont_touch_amount, $secure_key, $shop ? new Shop((int)$shop->id) : null);
  if (count($transaction) > 0)
  {
PayPalOrder::saveOrder((int)$this->currentOrder, $transaction);

//Begin edit to save transaction_id in main ps_order_payment table.
$order = new Order((int)$this->currentOrder);
$payments = $order->getOrderPaymentCollection();
$payments[0]->transaction_id = $transaction['id_transaction'];
$payments[0]->update();
//End edit to save transaction_id in main ps_order_payment table.
  }
 }
}
}

 

je test et vous dis si ça fonctionne.

Edited by erehcab (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...