PHP forums, MySQL forums, Web Development resources

Home PageHome    PHP ResourcesTopic List    FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups 
 RegisterRegister
    ProfileProfile    Log in to check your private messagesLog in to check your private messages    Download the RSS Reader RSS Feed Download the RSS Reader RSS for this forum Log inLog in 

PHP Forum :: MySQL Forum :: Java Script Forum



auto submit form?

 
Post new topic   Reply to topic    WeberForums.com Forum Index -> MySQL General
View previous topic :: View next topic  
Author Message
tcarey715



Joined: 18 Jun 2005
Posts: 205
Location: Dallas

PostPosted: Wed Feb 06, 2008 8:21 pm    Post subject: auto submit form? Reply with quote

Hello -

I am trying to integrate a PayPal cart into a client's website. The order of operations for the integration is:

1. Website sends client to Paypal to complete the transaction.
2. Paypal sends back transaction ID (via GET) and specified return URL
3. Website needs to send form back to paypal (via POST). POST needs to contain the transaction ID plus the merchant's identity token.
4. Paypal validates both ID's and sends data back to website with success / fail.

My problem is on #3. How can I submit the form back to paypal without relying on the customer clicking on another button? In other words, is there a way to "auto-submit" a form using php?

Is this what fsockopen is for?

Tim
Back to top
View user's profile Send private message Visit poster's website
lostboy



Joined: 02 May 2004
Posts: 5128
Location: toronto, canada

PostPosted: Thu Feb 07, 2008 12:29 am    Post subject: Reply with quote

seems a might complex, there is usually only one transaction going to paypal and back with the confirmation / transaction number...
_________________
Lostboy

Cat, the other other white meat

Please read Posting Etiquette before posting

You can always try Google
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
tcarey715



Joined: 18 Jun 2005
Posts: 205
Location: Dallas

PostPosted: Thu Feb 07, 2008 12:35 am    Post subject: Reply with quote

Yeah, that's what I thought. But Paypal's documentation explained it like that. We send them the shopping cart details, customer completes the transaction, Paypal sends us the transaction ID, then we have to somehow return both the transaction ID and our unique merchant token for final validation. THEN they POST the success/fail message with the customer's details.

They call it the IPN method, not sure if this means anything. Anyway, what I need is to somehow have the transaction/merchant token POST back to PayPal without having to depend on the customer submitting another form on my site.

Make sense?
Back to top
View user's profile Send private message Visit poster's website
lostboy



Joined: 02 May 2004
Posts: 5128
Location: toronto, canada

PostPosted: Thu Feb 07, 2008 5:14 am    Post subject: Reply with quote

you may want to try curl then
_________________
Lostboy

Cat, the other other white meat

Please read Posting Etiquette before posting

You can always try Google
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Display posts from previous:   
WeberTrivia Questions WeberTrivia Questions
 Think you are smart? Prove it!. Try your skills with these questions :
 WeberTrivia QuestionsRecursive arrays and multi-dimensional arrays are one and the same. (PHP and MySQL)
 WeberTrivia QuestionsThe \"cache_dir\" tag of the squid configuration has a default of /var/spool/squid. (Linux)

WeberTrivia Questions



PHP Code Examples
 Stream diffrent sizes of images from a single image to save disk space.
 JavaScript dropdown list menu to switch any page.
 Dump the contents of a PHP variable in html format with a recursive list of subfolders and files from a given root directory.
 PHP Dump in html format the contents of one array variable with a recursive list of the nested array variables inside.
 Link Extractor - This function is used to extract links from a given URL. This will convert relative path into absolute path and also remove PHPSESSID stuff.
 Building a Dynamic Form using Javascript and innerHTML. Add form elements in realtime without refreshing the page.
 A PHP Calendar function with CSS : add a cool calendar to any php page by just adding a calendar class based function.
Post new topic   Reply to topic    WeberForums.com Forum Index -> MySQL General All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum






Powered by phpBB © 2001, 2005 phpBB Group
PHP Forum :: MySQL Forum :: Java Script Forum