Can I reinstall PayPal? Or is it a fixed part of Magento.

Background: Im having some very serious trouble with the module, I might have destroyed something during the update even though I dont think so.

Whenever an order is completed (the PayPal website has redirected to my site and the user has clicked place order), there's an error message express checkout cannot be initialized. The order has been placed correctly though and the money has been transferred from PayPal to my account.

Any ideas are greatly appreciated.

EDIT: I found a log entry in the exception.log, it seems there is a table missing which is new to version 1.9.1... but why? How can I add it?

  • Im not sure how I should say this more precisely. The question is: Can I reinstall PayPal. How is this too broad? – Yorrd Jan 27 '15 at 15:34
  • It sounds like you might have run a store upgrade without the proper preparations first, if so there could be any number of issues that need resolving making this far too much of a broad question with the extremely sparse level of information available in the question. – Jonathan Hussey Jan 27 '15 at 16:05
  • @JonathanHussey okay, thank you for the explanation, please see my edit – Yorrd Jan 27 '15 at 16:47
  • @Marius I would be very pleased if you could unhold the question. I have added information according to what I was being told. The reason I asked the question so broadly is that I didn't realize it was broad. – Yorrd Jan 27 '15 at 16:48

No you cannot reinstall paypal as a module. I did however dig into the source code to figure out what may be causing this error to display.

It boils down to a small block of code in /path/to/magento/app/code/core/Mage/Paypal/Controller/Express/Abstract.php

if (!$quote->hasItems() || $quote->getHasError()) {
            $this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');
            Mage::throwException(Mage::helper('paypal')->__('Unable to initialize Express Checkout.'));
        $this->_checkout = Mage::getSingleton($this->_checkoutType, array(
            'config' => $this->_config,
            'quote'  => $quote,

What its saying is "if the quote has no items or has an error" then throw the 'unable to init checkout' error.

I'm going to guess that the quote has items in it, so you need to check your magento AND php error log for possible errors that are occurring.

Also, if you have anything installed that extends the Paypal Express Controller, you might want to try disabling that.

As always, albeit difficult, attempt to test using a site with the default theme. All kinds of nonsense can be tested out by doing this. Just overriding ../template/paypal/express can cause the wrong info to pass back and forth from paypal servers.

|improve this answer|||||
  • Thank you for your explanations, this all makes sense to me due to its well written nature. Please see my edit for more information from the log :) – Yorrd Jan 28 '15 at 9:19

Here's what you could try to do.

IMPORTANT: Always make a full backup of your Magento file system and database first! Also make sure the Magento Compiler and all Cache are disabled.

  1. Go to the Magento Connect Manager and check if all the latest packages are installed. If not, update all packages to the latest version and see if the PayPal error is solved now. If you already have all the latest packages installed, or the error is not solved after updating then proceed to step 2 below.

  2. Go to the Magento website and download the latest CE version of Magento ( You say you already have this version installed, but maybe the installation was incomplete or incorrect.

  3. Use FTP or SSH to upload all files of Magento CE, overwriting all existing files of your installation.

  4. Go into your database and look for the table core_resource. From this table delete the row paypal_setup (and paypaluk_setup if necesarry).

  5. In your Admin Panel clear all cache and log out. Log back in again. This should cause the PayPal install script to run again.

  6. Check if the issue is solved.

|improve this answer|||||
  • Thanks a lot for the detailed instructions, this is a very good answer. I have by now figured out that there was an issue with the Magento update where it didn't create two tables from core (see my answer), that's why your solution didn't help. +1 for the good answer though! – Yorrd Jan 28 '15 at 10:02
  • Glad you got it figured out! Please don't forget to accept your own Answer as correct to make sure this Question is marked as Answered. – ForMat Jan 28 '15 at 10:05
  • I will, have to wait for a couple of hours though ;) – Yorrd Jan 28 '15 at 10:05

Solution was to

  1. install a new Magento system and
  2. just copy the tables core_email_queue and core_email_queue_recipients

For some reason, during my update, those tables weren't created.

Thanks @CarComp for helping me figure out where to look.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.