Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
[SOLVED] Upgrade to 1.3.2.2: PayPal IPN and My Downloadable Products cease to work
 
websitebob
Member
 
Total Posts:  33
Joined:  2008-04-16
 

Greetings,

I am reposting here since a similar thread was marked [Solved] using a hack and the larger problem remains unsolved.
ref: http://www.magentocommerce.com/boards/viewthread/47584/

PayPal ceases to work after upgrading from 1.3.2.1 to 1.3.2.2. You can log into your merchant account and view the IPN history on PayPal.com - You’ll see a message that PayPal is retrying to send the IPN; meaning its a Magento issue.

As recommended in the above thread, one can overwrite the PayPal files in code/core/Mage/Paypal with the last version of Magento (1.3.2.1). The IPNs transmitted by PayPal will again be received by Magento, but you’ll need to manually release pending orders in the Admin panel by issuing an invoice.

That, however, does not fix the larger problem. PayPal doesn’t work on the current version.

It also does not fix a larger, connected problem:  Once the IPN is received, Magento does not post completed orders to the customer’s My Downloadable Products page. And, no links are sent in the customer’s email. In other words, Magento is issuing completed orders with this hack, but ver. 1.3.2.2 is not issuing download links - even with the overwrite of the older PayPal files.

This has effectively killed all commerce on my client’s downloads website.

Mods:  Any suggestions are urgently welcome as this is a live e-commerce site.

Thanks in advance,
-websitebob

 
Magento Community Magento Community
Magento Community
Magento Community
 
websitebob
Member
 
Total Posts:  33
Joined:  2008-04-16
 

I overwrote code/core/Mage/Paypal with the prior 1.3.2.1 version folder and the IPN works again. Orders show up in the Admin panel as “Completed.” Previously, orders were pending because the IPN was not being received.

I then took a chance and overwrote code/core/Mage/Downloadable with the prior 1.3.2.1 version folder. Download products purchased when priced at $0.00 work: The download links show up under the customer’s My Downloadable Products page. However, orders purchased throughPayPal are NOT appearing in My Downloadable Products. This means, there’s still a disconnect in a related, dependent file is outside of the Paypal and Dowloadable Mage folders in ver. 1.3.2.2. I don’t where that file may be.

Incidentally - There is no custom coding or download extensions on this site.

I really have to get this client back online and am weighing possibility of completely rewriting the whole site, as opposed to just the Mage folder.

Again, suggestions are welcome from anyone who has some experience in these areas is greatly appreciated.

Thanks in advance,

-websitebob

 
Magento Community Magento Community
Magento Community
Magento Community
 
websitebob
Member
 
Total Posts:  33
Joined:  2008-04-16
 

Okay. Overwriting Mage with 1.3.2.1 made no difference.

I’ve gone through every order and I’m seeing that there has Magento has never placed a download link in the customer’s My Downloadable Product page or in the customer’s order copy when the order was paid through PayPal. I’m only getting links when the product is free.

Still looking.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bicycle records
Jr. Member
 
Total Posts:  16
Joined:  2008-11-10
 

I am having the same problem, any ideas?
-ross

 
Magento Community Magento Community
Magento Community
Magento Community
 
websitebob
Member
 
Total Posts:  33
Joined:  2008-04-16
 

@Killoff with Varien responded on a post related to paypal with a code change, while a forum member also made some notable fixes:

http://www.magentocommerce.com/boards/viewthread/47584/P30/

Even with those PayPal fixes, download links still are not provided in My Downloadable Products WHEN returning from PayPal. Download links only appear when the price is FREE. So, a step is being skipped at the point where the customer is returned from PayPal.

I will be digging through some files.

Varien, your input is welcome.

Regards
-websitebob

 
Magento Community Magento Community
Magento Community
Magento Community
 
websitebob
Member
 
Total Posts:  33
Joined:  2008-04-16
 

I’m looking at the Checkout Success page and the PayPal Standard instructions that come before it.

1) A FREE (or Zero subtotal) purchase goes direct to the Checkout Success page.

code > core > Mage > Downloadable > Block > Success.php

Success.php:  Here, a script asks if a session exists and, if so, looks for downloadables in the last order. IF this is true, it will GET the list of Downloadable Products, as shown here:

class Mage_Downloadable_Block_Checkout_Success extends Mage_Checkout_Block_Onepage_Success
{

/**
* Return true if order(s) has one or more downloadable products
*
* @return bool
*/
public function getOrderHasDownloadable()
{
$hasDownloadableFlag = Mage::getSingleton(’checkout/session’)
->getHasDownloadableProducts(true);
if (!$this->isOrderVisible()) {
return false;
}

/**
* Return url to list of ordered downloadable products of customer
*
* @return string
*/
public function getDownloadableProductsUrl()
{
return $this->getUrl(’downloadable/customer/products’, array(’_secure’ => true));
}
}

_____________

2) This list does NOT appear on the Checkout Success page for PayPal purchases.

code > core > Mage > Paypal > controllers > StandardController.php

StandardController.php:  Is it possible the problem is tied to the PayPal session variable instructions or the POST instruction before redirecting to the Checkout Success page? Here are snippets from StandardController.php:

class Mage_Paypal_StandardController extends Mage_Core_Controller_Front_Action

/**
* When a customer chooses Paypal on Checkout/Payment page
*
*/
public function redirectAction()
{
$session = Mage::getSingleton(’checkout/session’);
$session->setPaypalStandardQuoteId($session->getQuoteId());
$this->getResponse()->setBody($this->getLayout()->createBlock(’paypal/standard_redirect’)->toHtml());
$session->unsQuoteId();
}

-----

* when paypal returns
* The order information at this point is in POST
* variables.  However, you don’t want to “process” the order until you
* get validation from the IPN.
*/
public function successAction()
{
$session = Mage::getSingleton(’checkout/session’);
$session->setQuoteId($session->getPaypalStandardQuoteId(true));
/**
* set the quote as inactive after back from paypal
*/
Mage::getSingleton(’checkout/session’)->getQuote()->setIsActive(false)->save();

//Mage::getSingleton(’checkout/session’)->unsQuoteId();

$this->_redirect(’checkout/onepage/success’, array(’_secure’=>true));
}

/**
* when paypal returns via ipn
* cannot have any output here
* validate IPN data
* if data is valid need to update the database that the user has
*/
public function ipnAction()
{
if (!$this->getRequest()->isPost()) {
$this->_redirect(’’);
return;
}

_______

Thanks in advance
-websitebob

 
Magento Community Magento Community
Magento Community
Magento Community
 
gbear
Jr. Member
 
Total Posts:  17
Joined:  2008-08-08
 

Hey Bob, Paypal issue I can’t help with (using auth.net). 

But having the same issue with the download links not being available post-purchase - might be a secondary issue regardless of payment processing. I diff’d the whole /downloadable directory from 1.3.2.2 and 1.3 (where things last worked it seems) and have it narrowed to about 4 files.  Posted here & added another issue on it in the bug tracker.

http://www.magentocommerce.com/boards/viewthread/29011/P15/

 Signature 

Bear Development & Marketing

 
Magento Community Magento Community
Magento Community
Magento Community
 
websitebob
Member
 
Total Posts:  33
Joined:  2008-04-16
 

Thanks gbear!

Downloads are working with your fix and a fix by digger149.

The corrections I made can be found here:

http://www.magentocommerce.com/boards/viewthread/29011/P15/#t157379

Regards
-websitebob

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2010 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
191338 users|763 users currently online|308861 forum posts