I have just come accross the same problem with a partial reund, and thought I share my workaround to enable it to work.
I also recieved error code 10009, but this has many errors assosiated with it. So I turned loging on and looked at the CURL log, which showed error 10009 - with the text 'The partial refund must be the same currency as the original transaction'.
My store only accepts GBP so I did a quick and dirty edit to paypal_curl.php to add the currency as one of the parameters - and bingo - it worked.!!
So code to change - in paypal_curl.php within the function RefundTransaction (about line 257)
Change this
Code:
if ($amount != 'Full' && (float)$amount > 0) {
$values['REFUNDTYPE'] = 'Partial';
$values['AMT'] = number_format((float)$amount, 2);
} else {
$values['REFUNDTYPE'] = 'Full';
}
to this (added line in red)
Code:
if ($amount != 'Full' && (float)$amount > 0) {
$values['REFUNDTYPE'] = 'Partial';
$values['AMT'] = number_format((float)$amount, 2);
$values['CURRENCY']='GBP';
} else {
$values['REFUNDTYPE'] = 'Full';
}
I'm guessing that if you accept multiple currencies you'd have to pick up the currency from the order and pass it into the function as a parameter.
Hope this helps - it worked for me
Bookmarks