Can I use cURL in PHP to effectively do what a PayPal "Buy now" button would do?

nozavroni
New Community Member

I am building a website for a client that allows a user to sign up for their services. There are two payment options when the user signs up. If they select the "pay now" option, I want it to be as if they had clicked a PayPal "Buy now" button. I was wondering if it is possible to basically do what that button would normally do, but do it with PHP and cURL. It still would redirect to PayPal's website and perform the payment transaction as usual, but the POST data that normally would come from the "Buy now" button would instead come from my PHP/cURL script.

 

Does this make sense? And is it possible? I tried it and got an error page, but I'm not sure if it's because I'm using cURL wrong or if it is against PayPal's policy or something.

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.