luis.delatorre Posted July 1, 2015 Share Posted July 1, 2015 Buenas tardes:Estoy teniendo un problema con el módulo PayPal México.1. Hago login con un algun usuario cliente de mi tienda.2. Selecciono un producto.3. Voy a pagarlo.4. Selecciono PayPal como forma de pago.5. Me redirecciona a una pagina para loguearme como usuario paypal.6. Ingreso los datos de Paypal.7. Me devuelve a mi tienda pero los datos de usuario que ingrese en el punto 1 se pierden.8. Aparecen los datos de usuario y direccion de la cuenta de PayPal. Ya intenté modificando el archivo standard.tpl <input type="hidden" name="address_override" value="1" /> por <input type="hidden" name="address_override" value="0" /> Pero o no tomá el cambio o no basta esa solución. Espero alguien pueda ayudarme 1 Link to comment Share on other sites More sharing options...
rembao Posted July 13, 2015 Share Posted July 13, 2015 Estoy en la misma situación. Si alguien pudiera ayudarnos a saber porqué prestashop sigue este proceso? Un saludos! Link to comment Share on other sites More sharing options...
luis.delatorre Posted July 13, 2015 Author Share Posted July 13, 2015 Hola al final pude corregir este problema editando el archivo: modules/paypalmx/controllers/front/expresscheckout.php Comentando todo este código: /* Checks if a customer already exists for this e-mail address */ /* if (Validate::isEmail($result['EMAIL'])) { $customer = new Customer(); $customer->getByEmail($result['EMAIL']); } */ /* If the customer does not exist yet, create a new one */ /* if (!Validate::isLoadedObject($customer)) { $customer = new Customer(); $customer->email = $result['EMAIL']; $customer->firstname = $result['FIRSTNAME']; $customer->lastname = $result['LASTNAME']; $customer->passwd = Tools::encrypt(Tools::passwdGen()); $customer->add(); } */ /* Look for an existing PayPal address for this customer */ /* $addresses = $customer->getAddresses((int)Configuration::get('PS_LANG_DEFAULT')); foreach ($addresses as $address) if ($address['alias'] == 'PayPal') { $id_address = (int)$address['id_address']; break; } */ /* Create or update a PayPal address for this customer */ /* $address = new Address(isset($id_address) ? (int)$id_address : 0); $address->id_customer = (int)$customer->id; $address->id_country = (int)Country::getByIso($result['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE']); $address->id_state = (int)State::getIdByIso($result['PAYMENTREQUEST_0_SHIPTOSTATE'], (int)$address->id_country); $address->alias = 'PayPal'; $address->lastname = Tools::substr($result['PAYMENTREQUEST_0_SHIPTONAME'], 0, strpos($result['PAYMENTREQUEST_0_SHIPTONAME'], ' ')); $address->firstname = Tools::substr($result['PAYMENTREQUEST_0_SHIPTONAME'], strpos($result['PAYMENTREQUEST_0_SHIPTONAME'], ' '), Tools::strlen($result['PAYMENTREQUEST_0_SHIPTONAME']) - Tools::strlen($address->lastname)); $address->address1 = $result['PAYMENTREQUEST_0_SHIPTOSTREET']; if ($result['PAYMENTREQUEST_0_SHIPTOSTREET2'] != '') $address->address2 = $result['PAYMENTREQUEST_0_SHIPTOSTREET2']; $address->city = $result['PAYMENTREQUEST_0_SHIPTOCITY']; $address->postcode = $result['PAYMENTREQUEST_0_SHIPTOZIP']; $address->save(); */ /* Update the customer cookie to simulate a logged-in session */ /* $this->context->cookie->id_customer = (int)$customer->id; $this->context->cookie->customer_lastname = $customer->lastname; $this->context->cookie->customer_firstname = $customer->firstname; $this->context->cookie->passwd = $customer->passwd; $this->context->cookie->email = $customer->email; $this->context->cookie->is_guest = $customer->isGuest(); $this->context->cookie->logged = 1; */ /* Update the cart billing and delivery addresses */ /* $this->context->cart->id_address_delivery = (int)$address->id; $this->context->cart->id_address_invoice = (int)$address->id; $this->context->cart->secure_key = $customer->secure_key; $this->context->cart->update(); */Saludos. 2 Link to comment Share on other sites More sharing options...
Recommended Posts