Re: Re: [PHP] Creating SSL Connection to Accept Credit Cards
I am not sure if that is what they want. I will try it and get back. Good suggestion. From: Adam Voigt [EMAIL PROTECTED] Date: 2002/11/05 Tue PM 12:33:00 EST To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] Creating SSL Connection to Accept Credit Cards Like: $f = fopen(https://whatever.com,r;) ? On Tue, 2002-11-05 at 12:31, [EMAIL PROTECTED] wrote: My credit card processor requires that I create an SSL connection in order to generate a transaction key. How would I go about writing a script to do so. Please point me in the right direction. The tech support says that it can only be done in ASP, but I find that hard to believe. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards
Except that https:// doesn't work with fopen until PHP 4.3.0. Suggestions are only good if they work with a current version of PHP. :) (No, I don't consider 4.3.0 current until it's at *least* released) Regardless, until then, CURL support is probably the way to go. Assuming you have curl support, it's fairly straightforward: --- $ch = curl_init(https://somesite.com;); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $authorization_data); $result = curl_exec($ch); $errorstr = curl_error($ch); curl_close($ch); --- $result contains the data received and $errorstr contains the error message (if any) if it was unsuccessful. Translating $result depends on how they return the data. With the above example, you'll need to have $authorization_data in POST format, which really is nothing more than the GET format string. (Secure transaction APIs typically don't allow GET) var=somevaluevar2=somevalue2var3=anothervalue -Original Message- From: Ben C. [mailto:benc;cox.net] Sent: Tuesday, November 05, 2002 11:55 AM To: Adam Voigt Cc: [EMAIL PROTECTED] Subject: Re: Re: [PHP] Creating SSL Connection to Accept Credit Cards I am not sure if that is what they want. I will try it and get back. Good suggestion. From: Adam Voigt [EMAIL PROTECTED] Date: 2002/11/05 Tue PM 12:33:00 EST To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] Creating SSL Connection to Accept Credit Cards Like: $f = fopen(https://whatever.com,r;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards
Duh dude, it's clear they only work in 4.3.0. I already said that in a previous message, pay attention. On Tue, 2002-11-05 at 13:09, Jaime Bozza wrote: Except that https:// doesn't work with fopen until PHP 4.3.0. Suggestions are only good if they work with a current version of PHP. :) (No, I don't consider 4.3.0 current until it's at *least* released) Regardless, until then, CURL support is probably the way to go. Assuming you have curl support, it's fairly straightforward: --- $ch = curl_init(https://somesite.com;); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $authorization_data); $result = curl_exec($ch); $errorstr = curl_error($ch); curl_close($ch); --- $result contains the data received and $errorstr contains the error message (if any) if it was unsuccessful. Translating $result depends on how they return the data. With the above example, you'll need to have $authorization_data in POST format, which really is nothing more than the GET format string. (Secure transaction APIs typically don't allow GET) var=somevaluevar2=somevalue2var3=anothervalue -Original Message- From: Ben C. [mailto:benc;cox.net] Sent: Tuesday, November 05, 2002 11:55 AM To: Adam Voigt Cc: [EMAIL PROTECTED] Subject: Re: Re: [PHP] Creating SSL Connection to Accept Credit Cards I am not sure if that is what they want. I will try it and get back. Good suggestion. From: Adam Voigt [EMAIL PROTECTED] Date: 2002/11/05 Tue PM 12:33:00 EST To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] Creating SSL Connection to Accept Credit Cards Like: $f = fopen(https://whatever.com,r;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards
Is there anything else that I can do. I am running PHP 4.1.2 so the fopen() doesn't work and I donot have support for CURL. Any other suggestions? From: Jaime Bozza [EMAIL PROTECTED] Date: 2002/11/05 Tue PM 01:09:37 EST To: 'Ben C.' [EMAIL PROTECTED], 'Adam Voigt' [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards Except that https:// doesn't work with fopen until PHP 4.3.0. Suggestions are only good if they work with a current version of PHP. :) (No, I don't consider 4.3.0 current until it's at *least* released) Regardless, until then, CURL support is probably the way to go. Assuming you have curl support, it's fairly straightforward: --- $ch = curl_init(https://somesite.com;); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $authorization_data); $result = curl_exec($ch); $errorstr = curl_error($ch); curl_close($ch); --- $result contains the data received and $errorstr contains the error message (if any) if it was unsuccessful. Translating $result depends on how they return the data. With the above example, you'll need to have $authorization_data in POST format, which really is nothing more than the GET format string. (Secure transaction APIs typically don't allow GET) var=somevaluevar2=somevalue2var3=anothervalue -Original Message- From: Ben C. [mailto:benc;cox.net] Sent: Tuesday, November 05, 2002 11:55 AM To: Adam Voigt Cc: [EMAIL PROTECTED] Subject: Re: Re: [PHP] Creating SSL Connection to Accept Credit Cards I am not sure if that is what they want. I will try it and get back. Good suggestion. From: Adam Voigt [EMAIL PROTECTED] Date: 2002/11/05 Tue PM 12:33:00 EST To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] Creating SSL Connection to Accept Credit Cards Like: $f = fopen(https://whatever.com,r;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards
Unfortunately, if you don't have CURL support and you can't change that, you may be out of luck. HTTPS support requires CURL and OpenSSL, and in the future at least OpenSSL. I would speak with your hosting provider and see what they recommend. Perhaps they can add in CURL and OpenSSL support. If not, you may need to change providers. :) Jaime -Original Message- From: Ben C. [mailto:benc;cox.net] Sent: Tuesday, November 05, 2002 12:19 PM To: Jaime Bozza; 'Adam Voigt' Cc: [EMAIL PROTECTED] Subject: RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards Is there anything else that I can do. I am running PHP 4.1.2 so the fopen() doesn't work and I donot have support for CURL. Any other suggestions? From: Jaime Bozza [EMAIL PROTECTED] Date: 2002/11/05 Tue PM 01:09:37 EST To: 'Ben C.' [EMAIL PROTECTED], 'Adam Voigt' [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards Except that https:// doesn't work with fopen until PHP 4.3.0. Suggestions are only good if they work with a current version of PHP. :) (No, I don't consider 4.3.0 current until it's at *least* released) Regardless, until then, CURL support is probably the way to go. Assuming you have curl support, it's fairly straightforward: --- $ch = curl_init(https://somesite.com;); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $authorization_data); $result = curl_exec($ch); $errorstr = curl_error($ch); curl_close($ch); --- $result contains the data received and $errorstr contains the error message (if any) if it was unsuccessful. Translating $result depends on how they return the data. With the above example, you'll need to have $authorization_data in POST format, which really is nothing more than the GET format string. (Secure transaction APIs typically don't allow GET) var=somevaluevar2=somevalue2var3=anothervalue -Original Message- From: Ben C. [mailto:benc;cox.net] Sent: Tuesday, November 05, 2002 11:55 AM To: Adam Voigt Cc: [EMAIL PROTECTED] Subject: Re: Re: [PHP] Creating SSL Connection to Accept Credit Cards I am not sure if that is what they want. I will try it and get back. Good suggestion. From: Adam Voigt [EMAIL PROTECTED] Date: 2002/11/05 Tue PM 12:33:00 EST To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] Creating SSL Connection to Accept Credit Cards Like: $f = fopen(https://whatever.com,r;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards
Do you have telnet access to the server? If so, you could download the standalone CURL program invoke it via the exec() function call. -- JR -Original Message- From: Ben C. [mailto:benc;cox.net] Sent: Tuesday, November 05, 2002 13:19 PM To: Jaime Bozza; 'Adam Voigt' Cc: [EMAIL PROTECTED] Subject: RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards Is there anything else that I can do. I am running PHP 4.1.2 so the fopen() doesn't work and I donot have support for CURL. Any other suggestions? From: Jaime Bozza [EMAIL PROTECTED] Date: 2002/11/05 Tue PM 01:09:37 EST To: 'Ben C.' [EMAIL PROTECTED], 'Adam Voigt' [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards Except that https:// doesn't work with fopen until PHP 4.3.0. Suggestions are only good if they work with a current version of PHP. :) (No, I don't consider 4.3.0 current until it's at *least* released) Regardless, until then, CURL support is probably the way to go. Assuming you have curl support, it's fairly straightforward: --- $ch = curl_init(https://somesite.com;); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $authorization_data); $result = curl_exec($ch); $errorstr = curl_error($ch); curl_close($ch); --- $result contains the data received and $errorstr contains the error message (if any) if it was unsuccessful. Translating $result depends on how they return the data. With the above example, you'll need to have $authorization_data in POST format, which really is nothing more than the GET format string. (Secure transaction APIs typically don't allow GET) var=somevaluevar2=somevalue2var3=anothervalue -Original Message- From: Ben C. [mailto:benc;cox.net] Sent: Tuesday, November 05, 2002 11:55 AM To: Adam Voigt Cc: [EMAIL PROTECTED] Subject: Re: Re: [PHP] Creating SSL Connection to Accept Credit Cards I am not sure if that is what they want. I will try it and get back. Good suggestion. From: Adam Voigt [EMAIL PROTECTED] Date: 2002/11/05 Tue PM 12:33:00 EST To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] Creating SSL Connection to Accept Credit Cards Like: $f = fopen(https://whatever.com,r;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php