Jump to content

can you use curl to send user to paypal page?


hockey97

Recommended Posts

Hi, I am working on a order system. I want to know if it's possible to use curl in php to send paypal data and redirect person to their page.

 

I am using paypal standard which needs me to pass variables to the paypal page at the same time the user needs to redirected to their page. I am talking about the same effect as html's form.

 

you may ask why not just use html form if that is the same effect I want or need.

 

well it's because I need to chop up the form.

 

I am selling hosting services. In the form I  want them to pay for the stuff but at the same time I will create their account  and have it ready after they make payment they can start using their services that they bought.

 

So, I  need one submit button that when click it will do many things. It will generate an account for the user which means the database and create folders on my server etc.

 

I will then need to verify that the payment been made via paypal... either they paid by credit card or by paypal.

 

once I verify via ipn I then  update the database that the user made payment.

 

I was thinking to pass these html variables and inputs to php and have functions process them.

 

do you think I can still make the html form effect where the user gets directed to paypals page to enter their credit card information and other stuff???

 

 

Link to comment
Share on other sites

once I verify via ipn I then  update the database that the user made payment.

The IPN script generally uses Curl if it's the one generated from Paypal.

 

do you think I can still make the html form effect where the user gets directed to paypals page to enter their credit card information and other stuff???

Yes.

 

Link to comment
Share on other sites

so, would I redirect the user via javascript to the paypals page... after making a ajax post to that paypals page.

 

I am confused how I can make the same html form effect. Where it redirects the user to paypals page but also passes html variables.

 

 

Link to comment
Share on other sites

what I mean by  can I still make a html form effect where when you hit the submit button it redirects you to the paypals page. I am saying to use javascript where I will  via ajax post.. the variables to my php script or I might just directly post them to paypals page. Then after that is done I redirect the user to the paypals page where they enter their paypal or credit card information.

 

I fully can't picture in my head that this will be possible. I think javascript ajax will post the data before the person gets redirected to to paypals page. I would think the data would get lost or out of sync.

 

because when a html form is submitted... the data gets posted to paypals page at the time the user gets redirected to that page the post occurs.

 

the reason I have to use javascript is because the form will generate the cost of the hosting services to charge the person. I then will need to create an account and setup the website. which requires most of the input in the form to be posted to my own php file to do that stuff.

 

yet the same form needs to pass a few variables to paypal and redirect the person to paypals check out page.

 

I can't use the standard html form  effect. since you can only post to one webpage.

 

If it's able to be done.... how would one do it... just give me the concept. I can code the stuff myself.

 

I just for some reason in my mind think you need to post the variables at the same time you redirect the person to paypals page. I don't know exactly how that paypal page works. Or is it that you when you post the variables to that page it will allow you some time to redirect the user to that page to see he variables values.

 

For instance the charges they need to pay. I don't want to redirect the user for them to see a charge of $0.00 and no items selected. this is what I think will happen.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.