Hi, all
Steve from xpractical.com.au here
Here are two bugs fixes in our production site. The hidden discount one causes magento/paypal to mark the order as fraud as the totals from the two systems don't add up with certain discount and tax settings. The IPN one causes an attempted order cancel to fail and mark the order as processing which in our system means its ok to ship and is picked up by our ERP integration.
There is also a bug in paypal express that skips the inventory decrement after successful order processing. Have not found a fix for that yet.
We have also found a bug in the aurthorise.net payment gateway. It will return "payment-ok" status on magento payment-update even if the payment has been cancelled. This means you cant use payment-update button.
Hope these tips help. Our site php7/magento community 1.9.3.1 is "mid" size at 30-100 orders per day @ $500-1500 per order with store views for US, UK and AU.
Bugs still in 1.9.3.1
mcd_steven@stage2:/var/www/temp-magento$ diff app/code/core/Mage/Paypal/Model/Ipn.php /var/www/magento/app/code/core/Mage/Paypal/Model/Ipn.php
533a534,540
> // MOD SMCD paypal bug, must remove invoice before order cancel otherwise order cancel will fail and go to processing
> foreach ($this->_order->getInvoiceCollection() as $invoice){
> $invoice->cancel()->save();
> }
mcd_steven@stage2:/var/www/temp-magento$ diff /var/www/magento/app/code/core/Mage/Paypal/Model/Hostedpro/Request.php /var/www/temp-magento/app/code/core/Mage/Paypal/Model/Hostedpro/Request.php
160,161c160
< // MOD SMCD 2016 - added hidden tax, missing this causes fraud trigger
< 'tax' => $this->_formatPrice($order->getBaseTaxAmount() + $order->getHiddenTaxAmount() ),
---
> 'tax' => $this->_formatPrice($order->getBaseTaxAmount()),