paypal used to and likely still does provide a GET API, where you can get them to click a paypal link with your referral code and it will process your payment then redirect them back to your page, no coding necessary other than HTML <a> tag link. if you want to design your own payment page and not redirect to paypal website, you can use API/sdk for javascript or PHP, probably python these days as well