在PayPal付款后存储用户名

I wrote a website in PHP last weeks. Users can register and login to my website. Logged in users are also able to buy an item on the site. Payment is handled by paypal via a paypal payment button. Payment is working fine, but.

Problem:

When a logged in user pays for the article, i only see in paypal that someone bought my article. but i need to know which user it was. Is there a way to store the username of the user that bought the article?

Its a problem that the paypal button is created by paypal, i cannot modify that button with my own code.

Which Payment product are you implemented? For PayPal Payment Standard, there is "custom" variable that you can specify anything for your own tracking purposes: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/#id08A6HH00W2J

For Express Checkout, you can use "PAYMENTREQUEST_n_CUSTOM" variable: https://developer.paypal.com/docs/classic/api/merchant/DoExpressCheckoutPayment_API_Operation_NVP/