I developed a payment gateway with paypal and php with this SDK https://paypal.github.io/PayPal-PHP-SDK/
On my website implementation when buyer click on checkout he redirected to paypal for payment (sandbox for now) and he can see a paypal page with a next button, when buyer click con next button he redirected to my site in the url specified on $redirectUrls->setReturnUrl('myurl')
but in some examples I've seen for "Paypal Button Payment" the buyer must be accept the payment before he redirect to the website.
Am I doing something wrong?