PHP Project

Hi everyone,

I have a question on how to do something in php:

I'm trying to send credit card information to a processing gateway (Skipjack). The problem is, I need to do it entierly from a php script. The script is going to be called from a Java application. The java app will send some information that the php script will use to retrieve some information from a MySQL database (the information retrieved is cc information plus gateway serial number). Then the php script needs to send the information to Skipjack for processing and retrieve the response which is finally sent to the java app.

I can do everything except for sending the info to Skipjack. Problem is also that Skiphack address is a https address while my site is currently hosted on a non-secure server.

So far I found out I need to use fsockopen or something.

Can anyone help me out?? That would be awesome!!

Thank you!
Mounir

Re: PHP Project

[quote="mshita"]The problem is, I need to do it entierly from a php script. [/quote]
I'm just dying to know why. Please divulge.

[quote="mshita"]The script is going to be called from a Java application. [/quote]
Do you have that part covered already? How do you intend to do that?

[quote="mshita"]Problem is also that Skiphack address is a https address while my site is currently hosted on a non-secure server.[/quote]
That doesn't matter. You don't need a secure server to make an https request from your script any more than you need a secure server installed on your personal computer to browse a secure site. Instead of only serving requests, your script will now be sending requests-- to your gateway provider. You need either library functions that can make https requests (see the 'curl' library functions in the PHP manual), or you need to call a system command that does that (see the 'curl' utility). The first method would be preferable because it is more efficient, but curl has to be compiled in with your PHP installation. The curl library and utility are the only solutions that I am aware of, but that doesn't mean there aren't any other solutions.

Your non-secure site is just for testing, right? I mean, if you're going to be accepting credit card information directly from your site you should have SSL encryption with a registered certificate. Certificates are cheap these days. You can find them for around $60 or less. You need SSL built into the web server and a dedicated IP for the site.

Re:PHP Project

[quote]I'm just dying to know why. Please divulge.[/quote]

No browser are going to be used. There is going to be only cell phones and a web server app that controls the flow of data between several clients (non-browser clients) and keeps track of a MySQL database.

Obviously as soon as we get funded (it's a startup) we'll hire someone to do this part of the work. But until then PHP is the only thing I kind of know. I'm a Java ME developer.

[quote]Do you have that part covered already? How do you intend to do that?[/quote]

Yes, right now I have a php script that "fakes" the whole process. It gets invoked by a Java app running on cells. Works perfect.

Re:PHP Project

I get it. Clever. It sounds like a nice way to provide services to cell phone users without being the cell phone service provider. Very interesting. Let me know how it works out.

Re:PHP Project

Believe me.....when we get the system up and running you're going to be amazed. It is definately not what you think this is :) But won't happen before I find a php guy or before I become an expert on php myself :)