Hi RadekD,
Welcome! 🙂
Normally the customer would need to click the "Return to Merchant" button on the payment confirmation (Thank you) page. To get the redirect to happen automatically, you'll need to turn on "Auto Return". Instructions for turning this on are here:
Auto Return
To get the customer's information to be sent along with the redirect, you'll need to use Payment Data Transfer (PDT). Keep in mind that this feature does require the browser to redirect to your page. This means that if the buyer closes their browser before the redirect, you won't receive the information. It's best to only use PDT to populate your website order confirmation or thank you page with dynamic info. If you need that information for other reasons, we recommend using Instant Payment Notifications (IPN) which are asynchronous meaning it's server to server and doesn't depend on a browser redirect.
For best practices and developer questions/tips, I recommend the PayPal Developer Forums. There is a dedicated board for PDT and IPN discussion.
We don't have code samples for Ruby but you may find it helpful to reference some of the code we have for other languages.
PDT Code Samples
IPN Code Samples
I hope this helps! 🙂
- Frank
... View more