Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php and verisign

Status
Not open for further replies.

riffy

Programmer
Mar 29, 2001
106
0
0
US
Hi all,

It's been a long time since I wrote. I had a question about saving values in my form somewhere before sending them to Verisign because some of the variables get lost in the transaction part. I don't know how many of you have used VeriSign on sites AND with PHP but basically I'm making a website which has a form where users can come and register for a Convention. It has the basic fields of name, address, city, state, zip, country, phone, email, and the registration information. However I have about 4 extra fields in my form that are not used by Verisign and thus their values get lost. I wanted to know how to save those 4 values so that they can be entered into a database I have set up.
What I have done right now is that the user fills out the form with all their information and it takes them thru Verisign's forms to confirm transaction. Now when the user is brought back to the site, the information is entered into the database but I lose those 4 fields. Is there any way around this? I've subscribed to Payflow Pro but nowhere in their SDK can I find anything about PHP. My hosting company is ipowerweb ( which provides mysql databases.

Thanks
Arif
 
i believe it is possible to submit to two pages at once, via action="page1.php;page2.php" where one page could take you to versign and the other to a db insert page...

or you could just all the code to insert into the db before the code to head to versign and complete transaction Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Rather than sending your users' browser to Verisign and back, you can also POST the data to Verisign directly through PHP.

I've written a FAQ (faq434-2502) which describes how to do this using either CURL or socket programming. One caveat: if you are posting to HTTPS, you'll have to use CURL. I haven't figured out how to send POST-method data to an HTTPS server yet, so it's not in the FAQ. ______________________________________________________________________
TANSTAAFL!
 
Bastien,

How do i insert into a db before it gets to verisign, don't those field names/values have to be processed first before php reads them?

I tried doing that but it wasn't being inserted into the database unless I'm doing something wrong.

sleipnir, thanks i'll try it but no guarantee it works though...can i email u if i have questions with the code?
 
Without meaning offense, no, you cannot email me. That would defeat the purpose of Tek-Tips' being a set of public forums.

If you have a question, chances are someone else has it, too and could benefit from any answers I might give you. ______________________________________________________________________
TANSTAAFL!
 
sleipnir

i tried using the code u posted using curl but i don't think the web server has the ability to use curl b/c it gave me an error at the line when u create a curl handle..
is there some other way i can do this...i've tried alot of things but i keep losing those values...

if anyone can be of any help, please let me know..i have to finish this by friday...

thanks
arif
 
Take a look at the second half of my FAQ. There's a way to do it using fopen() that's described there, too. ______________________________________________________________________
TANSTAAFL!
 
right but the server is https
u said that the code u have for fopen doesn't support https sites???
 
Sorry, I gave an off-the-cuff answer without thinking.

What is your hosting situation? If you are going to serve this from a server you have administrative access to, you could recompile PHP with CURL enabled.

Other than that, I'm out of ideas. Sorry. ______________________________________________________________________
TANSTAAFL!
 
yes i do have administration access to the server...well, the server is offered by ipowerweb.com who offer a linux server so it's completely php based..but how would i recompile php to make it curl enabled?
 
You CURL comes in a command-line version, too. That might be available on that server. My suggested script won't work as written, though. You'll have to invoke CURL as an external executable -- unfortunately, I have no experience with that.

If you want to enable PHP's CURL support with HTTPS, then:
First, install OpenSSL ( If you are uncomfortable with compiling from source, there are links from the CURL website to rpms.
Second, you must install CURL ( Third, you recompile PHP. Passing PHP the configuration script the directive "--with-curl" along with the other options currently compiles (PHP's phpinfo() function can tell you what the current options set is). ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top