0

Hi I'm doing this for a project so no need to worry about real world worries such as encription etc. I'm trying to put imported Values into the below form via a seperate php form on a different site. ie my website is a client of an online creditcard server(CCS) and I have to send the info to the online CCS for approval or refusal. Basically I validate the information within my php form and then send the information to the below form on a different site(p.s. I don't store the information on my database and the information transfer will be unencripted) The CCS then takes the information and gives back a 1 for approved and 0 for declined.

The two things I need to know is:
1. How do I fill in the values in the remote form from local variables?
2. Secondly how do I fetch the outcome of the transaction i.e. 1 Approval or 0 Declined.

I have searched the internet and can't find anything so any help would be much obliged.

Cheers sorry if it a very easy query!!!

Code blocks are created by indenting at least 4 spaces
... and can span multiple lines


<form method=get action=http://creditcardserver.com/v.php>
<table>
<TR><TD>First Name?</TD><TD><input type=text name=fname></tD></TR>
<TR><TD>Surname?</TD><TD><input type=text name=sname></tD></TR>
<TR><TD>Number?</TD><TD><input type=text name=number size=16></tD></TR>
<TR><TD>Expiry Month</TD><TD><input type=text name=month size=2></tD></TR>
<TR><TD>Expiry Year</TD><TD><input type=text name=year size=2></tD></TR>
<TR><TD>CCV</TD><TD><input type=text name=ccv size=3></tD></TR>
<TR><TD>Fail?</TD><TD><input type=checkbox name=fail></TD></TR>
<TR><TD>Amount</TD><TD><input type=text name=euro size=4><input type=text
name=cent value=00 size=1></tD></TR>

</table>
<input type=submit>
</form>
4
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by veedeoo
0

Do you have the code for the CCS form? If you're supposed to be passing this from your PHP script on the server side, it sounds like you want to send it directly to the CCS server using a library like cURL and a parametered URL request, not fill out a form on a remote server. If it's supposed to be in the HTML, that sounds more like AJAX.

0

Your dead right about the cURL asked the lecturer last night and he confirmed thats the method! I'm trying to figure out exactly how to make it work now loads of tutorials but none that match my requirements!!! Thanks for the tip!! It's definately php though as its a php project and its a requirement to vaildate the information before sending it to the server with php as the user must know the reason that the CC was rejected. Although I'm pretty sure this could be done client side I'll just stick with the php in this instance. Also I believe if JS is turned off it will be a disaster to validate Client side! I'll pm you the URL if you can give any help that would be fantastic!!!

0

Hi,

Show us the layout of your cURL and I will help you. I could have write it here for you, but I don't write codes for advance user. I don't want to deprive anyone the fun of learning on top what they already know. Show me some codes and I will help you out.

For students inquiries, I am always glad to write some codes for them. For advance users, they got to have some codes on the table where we can start to build upon.

Hint: Ask the ccs provider how the form is process. e.g

$_POST['fname']; $_POST['name'];

0

ok, I gave your question a much effort and considerations just to show how the remote form processor through cURL works. Here is my sample script sending a form data array to a remote server. One server is located in Nevada (this is the local form) and the data will be process in Texas (remote server). The remote server (Texas), will then response with confirmation including the boolean value.

You can try the simulator Here

The demo validates cc number to integers only..

0

Thanks, please check the simulator again. I made it to be able to send the data array to TWO remote servers.

Local server send data to server two --> server two sends data to server three, and response back to server one --> Server Three process the form and then respond to server two. Server two will relay the response of server Three back to server one.

Statements Below are NOT question Related:
I wrote another version of this script to move bigger files across servers.. actually it is called server load balancing, where the function is to protect the server load and space limit of an ffmpeg capable VPS server, the encoded video is then transported across the web to the site's owners other domain, at the speed of about 5MB/sec maybe faster than this, because 100MB video can be transported to two external server in less than 3 seconds, both external have the same copy of the video. The validation is pretty strict, so the remote processor must check the 200 characters salt coming from the first server.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.