I have properly set PayPal settlement reports - username, pass, everything.
When in Magento's admin panel I go to Reports > Sales > PayPal Settlement Reports and click Fetch Updates in var/log/system.log
I see these messages (actually much more then these but with the same pattern):
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: TransactionID in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: InvoiceID in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: PayPalReferenceID in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: PayPalReferenceIDType in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: TransactionEventCode in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: TransactionInitiationDate in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: TransactionCompletionDate in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: TransactionDebitOrCredit in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: GrossTransactionAmount in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: GrossTransactionCurrency in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: FeeDebitOrCredit in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: FeeAmount in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: FeeCurrency in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: CustomField in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: ConsumerID in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
2015-04-22T15:46:15+00:00 ERR (3): Notice: Undefined index: PaymentTrackingID in /www/app/code/core/Mage/Paypal/Model/Report/Settlement.php on line 301
and in the web interface of the admin panel I get a green ("succesful") message
Fetched 0 report rows from '...myusername@reports.paypal.com'
I have tried to debug the code but all I see on line 301 is:
$bodyItem[$rowMap[$flippedSectionColumns[$i]]] = $line[$i];
and I can't understand what is the problem. It seems ok at first glance.
I have tripple checked and debugged - the CSV files get properly downloaded from PayPal and the $line array is filled up with values. Still I am getting this error and the data is not fetched into Magento.
How to fix that?