I was working on the ‘official’ PayPal Express release for osCommerce:

https://cms.paypal.com/cms_content/GB/en_GB/files/developer/osc_PayPal_v177.zip

Installation was fine (other than the recurring payments bits which I did not install) but, when I was testing it on the PayPal Sandbox I found that I was being presented with no shipping fee at checkout_confirmation – just the single character ‘r’

Tracking down the reason took awhiles but here it is – in the file ext/modules/payment/paypal/express.php find the following at around line 300:

// select cheapest shipping method
$shipping = $shipping_modules->cheapest();
$shipping = $shipping['id'];

Change this by commenting out the last line

 // select cheapest shipping method
$shipping = $shipping_modules->cheapest();
//$shipping = $shipping['id'];