<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
    <title>Magento Issue Tracking</title>
    <link>http://www.magentocommerce.com/bug-tracking/</link>
    <description></description>
    <dc:language>en</dc:language>
    <dc:creator>MagentoCommerce</dc:creator>
    <dc:rights>Copyright {gmt_date format="%Y"}</dc:rights>
    <dc:date>{gmt_date format="%Y-%m-%dT%H:%i:%s%Q"}</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
        <item>
        <title>View Issue #28320 / Recurring trial tax/shipping amount</title>
        <link>http://www.magentocommerce.com/bug-tracking/issue?issue=14297</link>
        <description><![CDATA[<strong>Posted:</strong> 2012-10-04 05:30:52<br/><strong>Category:</strong> PayPal Integration<br/><strong>Version:</strong> 1.7.0.2<br/><strong>Priority:</strong> high<br/><strong>Status:</strong> new<br/><strong>Reported By:</strong> <a href="http://www.magentocommerce.com/boards/member/127411/">m4e</a></strong><br/><br/>Trial orders are created with tax/shipping amounts calculated for regular billing amount, but not for trial billing amount.<br />
<br />
Paypal recurring service supports separate values for trial tax/shipping amounts.<br />
But the database table `sales_recurring_profile` does not contain columns for trial tax amount and trial shipping amount. Certainly they are not calculated during the checkout.<br />
<br />
So while IPN-model processes the trial notification the tax and shipping values are empty (they were not POSTed). The trial product item is created via Mage_Sales_Model_Recurring_Profile::_getRegularItem method which contain the following code:<br />
$price = $itemInfo-&gt;getPrice() ? $itemInfo-&gt;getPrice() : $this-&gt;getBillingAmount();<br />
$shippingAmount = $itemInfo-&gt;getShippingAmount() ? $itemInfo-&gt;getShippingAmount() : $this-&gt;getShippingAmount();<br />
$taxAmount = $itemInfo-&gt;getTaxAmount() ? $itemInfo-&gt;getTaxAmount() : $this-&gt;getTaxAmount();<br />
<br />
On PayPal side the trial orders are charged without any tax nor shipping amount, because they were not sent by Magento during Recurring Profile creation. <br />
<br />
So there are two way to fix it: create trial orders with zero tax/shipping amounts, similar to they are created on PayPal side, or Magento should calculate these amounts for trial billing amount, send them to PayPal so the amounts will be sent within IPN request and the Magento order will have the correct amounts and totals.<br />
<br />
The quick fix for the first way is to replace <br />
... = $itemInfo-&gt;getPrice() ? ...<br />
... = $itemInfo-&gt;getShippingAmount() ? ...<br />
... = $itemInfo-&gt;getTaxAmount() ? ...<br />
with the following<br />
... = $itemInfo-&gt;hasPrice() ? ...<br />
... = $itemInfo-&gt;hasShippingAmount() ? ...<br />
... = $itemInfo-&gt;hasTaxAmount() ? ...<br />
<br />
But the second way to fix is preferred.<br />
Thank you.<br/><br/><hr/>]]></description>
    </item>
    
    </channel>
</rss>