I ran into a PayPal issue on a Magento Multistore (US, UK). Magento 126.96.36.199
The problem is that PayPal is rejecting the orders on the UK site. It is throwing following exception:
PayPal response hasn't required fields. files/html/app/code/local/Mage/Paypal/Model/Api/Nvp.php:1011
I figured out that the required fields are different in UK and US:
files/html/app/code/core/Mage/Paypal/Model/Api/Nvp.php protected $_requiredResponseParams = array( self::DO_DIRECT_PAYMENT => array('ACK', 'CORRELATIONID', 'AMT') ); files/html/app/code/core/Mage/PaypalUk/Model/Api/Nvp.php protected $_requiredResponseParams = array( self::DO_DIRECT_PAYMENT => array('RESULT', 'PNREF', 'PPREF') );
I caught the PayPal response and found out that the PayPal response is different - depending on the store. The response in UK didn't contain the parameter 'ACK' and 'CORRELATIONID'. So I assume the issue occurs because Magento is using the wrong Nvp.php (the standard one, not from the PayPalUk version). But how can I tell Magento to use the UK one?