Form Processing Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
paragonconcept
Forum Newbie
Posts: 4
Joined: Thu May 24, 2007 8:24 pm

Form Processing Question

Post by paragonconcept »

Hello,
So i have a simple form setup to embed some sensative account info and pass it, along with user info to a off-site payment gateway. The payment gateway uses asp and grabs the member info via post paramters. Once the paramters are passed to the off site gateway, the gateway returns the next stage of the form, and allows the user to make a secure payment. I've been trying to get this setup using libcurl, but obviously when i curl the output of the payment gateway, it breaks the SSL certification. Is there a way to do either keep the HTTPS stage valid, or simply a better way of doing this.

Here is an example of the form with the account info taken out.

Code: Select all

<html>
<body>
	<?php
		$ssl_nsSeats = $_POST['ssl_nsSeats'];
		$ssl_sSeats = $_POST['ssl_sSeats'];
		$ssl_amount = $_POST['ssl_amount'];
		
		$var1 = "ssl_merchant_id=XXXXXX";
		$var2 = "ssl_user_id=XXXXXX";
		$var3 = "ssl_cvv2=XXXXXX";
		$var4 = "ssl_pin=XXXXXX";
		
	   $curl = curl_init();
	   curl_setopt($curl, CURLOPT_URL,"https://www.viaKLIX.com/process.asp");
	   # curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); // Unsure how this actually works so i commented it out
	   curl_setopt($curl, CURLOPT_POST, 1);
	   curl_setopt($curl, CURLOPT_POSTFIELDS, "$var1&$var2&$var3&$var4&ssl_sSeats=$ssl_sSeats&ssl_amount=$ssl_amount&ssl_nsSeats=$ssl_nsSeats");

	   curl_exec ($curl);
	   curl_close ($curl);
	?>
</body>
</html>
Post Reply