Sorry, please ignore the following: It was my error and not a bug!!!
I would like to add a bug:
Using PayPal Standard as Payments provider returns error 4020 from PayPal when paypal redirects the user to yoursite/paypal/pdthandler.aspx, and as a result, the user is never redirected to /receipt.aspx to show him that his payment and purchase has been successful:
When PayPalService.Synchronize is called, the message back from PayPal is invariable a fail, because the wrong value is passed into the PdtId paramater.
Instead of passing in the Identity Token, as specified under YourPayPalMerchantAccount >> Profile >> Website Payments Preferences >> Payment Data Transfer, what gets passed instead is the PayPal API Identity
PayPalService.cs is passed the wrong parameter into its constructor for PdtId. What gets passed instead is the API Signature for your Merchant Account. The two things are quite distinct.
As there is no way to store the PDT Identity Token using the Control Panel, I have hardcoded this into the constructor of the PayPalServices.cs class. Therefore, resolution of this issue would, I presume, require:
1. Adding a node and writing that value into the web.config
2. Reading the PDT Identity Token into the PayPalPaymentStandardProvider when it is instantiated.
3. Passing the correct value, ie, the PDT Identity Token, into the constructor of PayPalService.cs so that its PdtId property holds the correct value.
If an alternative process already exists, and I have overlooked it, please document it more clearly.
If someone from the dev team wants to contact me, re reproducing the error, I would be happy to oblige.