Page 1 of 1

Securenet Payment System

Posted: Sun May 01, 2011 6:26 am
by vegascoop
Looking for someone to create a payment plugin for Securenet. Their API is attached.

Please PM me cost and time. Thanks.

Re: Securenet Payment System

Posted: Wed May 04, 2011 12:32 am
by vegascoop
I am attaching three sample PHP files provided by Securenet. This should dramatically decrease the time necessary for this project.

File 1:
CLASS GATEWAY.PHP
-------------------------

Code: Select all

<?php
// RESTful SecureNet Gateway Transaction Class
// Author: William Brall
// Created on: May/25/2010
// Usage: This class enables PHP applications to easily talk to the
//		SecureNet Gateway API for secure transactions. Please see
//		included documentation for data formatting instructions.
class Gateway
{
	private $host 		= "certify1.securenet.com";
	private $base_url 	= "https://certify1.securenet.com/api/gateway.svc/wsHttp";
	private $format;
	private $soap;
	private $soap_url	= "https://certify1.securenet.com/api/gateway.svc/soap";

	// format choices: 0 - 'xml'; 1 - 'array'; 2 - 'simplexml'; 3 - 'soap';
	public function __construct($format = "xml")
	{
		if($format == "soap" OR $format == 3)
		{
			$this->host 	= "certify1.securenet.com";
			$this->base_url = "http://certify1.securenet.com/api/gateway.svc?wsdl";
			$this->soap_url = "https://certify1.securenet.com/api/gateway.svc/soap";
			$this->soap = new SoapClient($this->base_url);
			$this->soap->__setLocation($this->soap_url);
		}
		else
		{
			$this->host 	= "certify1.securenet.com";
			$this->base_url = "https://certify1.securenet.com/api/gateway.svc/wsHttp";
		}
		$this->format = $format;
	}
	
	// Lists the valid methods you can use in this class, not very useful but can speed up dev time.
	public function methods()
	{
		echo "->ProcessTransaction(\$data[]);<br>\n";
		echo "->ProcessVaultTransaction(\$data[]);<br>\n";
		echo "->UpdateTransaction(\$data[]);<br>\n";
		echo "->ProcessAccount(\$data[]);<br>\n";
		echo "->ProcessCustomer(\$data[]);<br>\n";
		echo "->ProcessCustomerAndAccount(\$data[]);<br>\n";
		echo "->AddASPAccount(\$data[]);<br>\n";
		echo "->UpdateASPAccount(\$data[]);<br>\n";
		echo "->UpdateASPSchedule(\$data[]);<br>\n";
	}
	
	// This magic method allows for the selection of the above methods in the format: $response = $Gateway_object->method_name($array_of_data);
	public function __call($name, $request)
	{
		if(is_object($this->soap))
		{
			switch($name)
			{
				case "ProcessTransaction":
				case "AddASPAccount":
				case "UpdateASPAccount":
				case "UpdateASPSchedule":
					$r["TRANSACTION"] = $request[0];
				break;
				
				case "ProcessVaultTransaction":
				case "UpdateTransaction":
				case "ProcessAccount":
				case "ProcessCustomer":
				case "ProcessCustomerAndAccount":
					$r["TRANSACTION_VAULT"] = $request[0];
				break;
				
				default:
					throw new Exception('Method Choice Error - '.$name.' is not a valid Gateway method name.');
					return FALSE;
				break;
			}
			
			// Remove bool items
			$r = $this->soap_request($r);
			// No further formatting is offered for soap responses, as the soap response object is uber-powerful.
			$response = $this->soap->$name($r);
			
			//if($response->ProcessTransactionResult->TRANSACTIONRESPONSE->RESPONSE_CODE == 3)
			//{
			//	throw new Exception('Request Error - '.$response->ProcessTransactionResult->TRANSACTIONRESPONSE->RESPONSE_REASON_TEXT);
			//}
			return $response;
		}
		else
		{
			switch($name)
			{
				case "ProcessTransaction":
				case "AddASPAccount":
				case "UpdateASPAccount":
				case "UpdateASPSchedule":
					$xml  = '<TRANSACTION xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://gateway.securenet.com/API/Contracts">';
					$xml .= $this->xmlize($request[0]);
					$xml .= '</TRANSACTION>';
				break;
				
				case "ProcessVaultTransaction":
				case "UpdateTransaction":
				case "ProcessAccount":
				case "ProcessCustomer":
				case "ProcessCustomerAndAccount":
					$xml  = '<TRANSACTION_VAULT xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://gateway.securenet.com/API/Contracts">';
					$xml .= $this->xmlize($request[0]);
					$xml .= '</TRANSACTION_VAULT>';
				break;
				
				default:
					throw new Exception('Method Choice Error - '.$name.' is not a valid Gateway method name.');
					return FALSE;
				break;
			}
			return $this->send($xml,$name);
		}
	}
	
	// Format Soap Request (recursive)
	private function soap_request($request)
	{
		ksort($request);
		foreach($request as $k => $v) // For each root key of the array structure,
		{
			if(is_array($v)) // if the value is an array,
			{
				$r[$k] = $this->soap_request($v); // We recurse into that array;
			} 
			elseif(!is_bool($v)) // however, if it is a bool value, we leave it out.
			{
				$r[$k] = $v; // Otherwise, we keep it around.
			} 	
		}
		return $r; // Then return it.
	}

	// Format Request as XML (recursive)
	private function xmlize($request)
	{
		$xml = '';
		
		ksort($request); // At one time, perhaps still, the items in the XML needed to be alphabetized. This does that.
		
		foreach($request as $k => $v) // For each root key of the array structure,
		{
			if(is_int($k))
			{
				$xml .= $this->xmlize($v);
			}
			elseif(is_array($v)) // if the value is an array,
			{
				$xml .= '<'.$k.'>';
				$xml .= $this->xmlize($v); // walk that new array like the first;
				$xml .= '</'.$k.'>';
			} 
			elseif(is_bool($v) OR $v === "" OR is_null($v)) // however, if it is a bool value or NULL,
			{
				$xml .= '<'.$k.' i:nil="true" />'; // write out the funny bool i:nil value.
			} 
			else // Otherwise, and these should all be strings, but it will accept ints or floats as well,
			{
				$xml .= '<'.$k.'>'.$v.'</'.$k.'>'; // just write the value into a standard tag structure.
			}
		}
		return $xml;	
	}
	
	// Sends a request to the desired method.
	private function send($request, $method)
	{
		$header[] = "Host: ".$this->host;
		$header[] = "Content-type: text/xml";
		$header[] = "Content-length: ".strlen($request) . "\r\n";
		$header[] = $request;
		
		$ch = curl_init();
		curl_setopt( $ch, CURLOPT_URL, $this->base_url.$method);
		curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
		curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
		curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
		$result = curl_exec( $ch );
		curl_close($ch); 

		return $this->format_response($result);
	}
	
	// Formats the response based on a selection made when the object was instantiated.
	private function format_response($result)
	{
		// Detect for various types of errors.
		if(stristr($result, "Request Error") === FALSE AND stristr($result, "<RESPONSE_CODE>3") === FALSE)
		{
			// Select formatting type, this was chosen when the object was instantiated.
			switch(strtolower($this->format))
			{
				// Attempt to format as an Array. May fail for some Transaction Types.
				case "1":
				case "array":
					return xml2array($result);
				break;
				
				// Format as SimpleXML Elements. They aren't all that simple, really. :(
				case "2":
				case "simplexml":
					return simplexml_load_string($result);
				break;
				
				// Retain the XML formatting exactly as returned from the SecureNet Gateway.
				case "0":
				case "xml":
				default:
					return $result;
				break;
			}
		}
		// For Major Errors, causing the Gateway to Fail
		elseif(stristr($result, "<RESPONSE_CODE>3") === FALSE)
		{
			$err = explode('<P class="intro">',$result);
			$err = explode(" The exception stack trace is:</P>",$err[1]);
			throw new Exception('Major Request Error - '.$err[0]);
			return FALSE;
		}
		// For Lesser Errors, causing detailed Gateway Response Errors
		else
		{
			$err = explode('<RESPONSE_REASON_TEXT>',$result);
			$err = explode("</RESPONSE_REASON_TEXT>",$err[1]);
			throw new Exception('Request Error - '.$err[0]);
			return FALSE;
		}
	}
}

// The below function is useful for formatting some responses from the SecureNet Gateway as PHP Associative Arrays. 
// 	It may not always succeed, as XML and arrays can't always be interchanged.
//	Should this function fail on a request, try using 'simplexml' formatting instead.
//	Yes, I know that 'simplexml' isn't very simple, hence the inclusion of this function. :)

/**
 * xml2array() will convert the given XML text to an array in the XML structure.
 * Link: http://www.bin-co.com/php/scripts/xml2array/
 * Arguments : $contents - The XML text
 *                $get_attributes - 1 or 0. If this is 1 the function will get the attributes as well as the tag values - this results in a different array structure in the return value.
 *                $priority - Can be 'tag' or 'attribute'. This will change the way the resulting array sturcture. For 'tag', the tags are given more importance.
 * Return: The parsed XML in an array form. Use print_r() to see the resulting array structure.
 * Examples: $array =  xml2array(file_get_contents('feed.xml'));
 *              $array =  xml2array(file_get_contents('feed.xml'), 1, 'attribute');
 */ 
function xml2array($contents, $get_attributes=1, $priority = 'tag') {
    if(!$contents) return array();

    if(!function_exists('xml_parser_create')) {
        //print "'xml_parser_create()' function not found!";
        return array();
    }

    //Get the XML parser of PHP - PHP must have this module for the parser to work
    $parser = xml_parser_create('');
    xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); # http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss
    xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
    xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
    xml_parse_into_struct($parser, trim($contents), $xml_values);
    xml_parser_free($parser);

    if(!$xml_values) return;//Hmm...

    //Initializations
    $xml_array = array();
    $parents = array();
    $opened_tags = array();
    $arr = array();

    $current = &$xml_array; //Refference

    //Go through the tags.
    $repeated_tag_index = array();//Multiple tags with same name will be turned into an array
    foreach($xml_values as $data) {
        unset($attributes,$value);//Remove existing values, or there will be trouble

        //This command will extract these variables into the foreach scope
        // tag(string), type(string), level(int), attributes(array).
        extract($data);//We could use the array by itself, but this cooler.

        $result = array();
        $attributes_data = array();
        
        if(isset($value)) {
            if($priority == 'tag') $result = $value;
            else $result['value'] = $value; //Put the value in a assoc array if we are in the 'Attribute' mode
        }

        //Set the attributes too.
        if(isset($attributes) and $get_attributes) {
            foreach($attributes as $attr => $val) {
                if($priority == 'tag') $attributes_data[$attr] = $val;
                else $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'
            }
        }

        //See tag status and do the needed.
        if($type == "open") {//The starting of the tag '<tag>'
            $parent[$level-1] = &$current;
            if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag
                $current[$tag] = $result;
                if($attributes_data) $current[$tag. '_attr'] = $attributes_data;
                $repeated_tag_index[$tag.'_'.$level] = 1;

                $current = &$current[$tag];

            } else { //There was another element with the same tag name

                if(isset($current[$tag][0])) {//If there is a 0th element it is already an array
                    $current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;
                    $repeated_tag_index[$tag.'_'.$level]++;
                } else {//This section will make the value an array if multiple tags with the same name appear together
                    $current[$tag] = array($current[$tag],$result);//This will combine the existing item and the new item together to make an array
                    $repeated_tag_index[$tag.'_'.$level] = 2;
                    
                    if(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well
                        $current[$tag]['0_attr'] = $current[$tag.'_attr'];
                        unset($current[$tag.'_attr']);
                    }

                }
                $last_item_index = $repeated_tag_index[$tag.'_'.$level]-1;
                $current = &$current[$tag][$last_item_index];
            }

        } elseif($type == "complete") { //Tags that ends in 1 line '<tag />'
            //See if the key is already taken.
            if(!isset($current[$tag])) { //New Key
                $current[$tag] = $result;
                $repeated_tag_index[$tag.'_'.$level] = 1;
                if($priority == 'tag' and $attributes_data) $current[$tag. '_attr'] = $attributes_data;

            } else { //If taken, put all things inside a list(array)
                if(isset($current[$tag][0]) and is_array($current[$tag])) {//If it is already an array...

                    // ...push the new element into that array.
                    $current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;
                    
                    if($priority == 'tag' and $get_attributes and $attributes_data) {
                        $current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;
                    }
                    $repeated_tag_index[$tag.'_'.$level]++;

                } else { //If it is not an array...
                    $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value
                    $repeated_tag_index[$tag.'_'.$level] = 1;
                    if($priority == 'tag' and $get_attributes) {
                        if(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well
                            
                            $current[$tag]['0_attr'] = $current[$tag.'_attr'];
                            unset($current[$tag.'_attr']);
                        }
                        
                        if($attributes_data) {
                            $current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;
                        }
                    }
                    $repeated_tag_index[$tag.'_'.$level]++; //0 and 1 index is already taken
                }
            }

        } elseif($type == 'close') { //End of tag '</tag>'
            $current = &$parent[$level-1];
        }
    }
    
    return($xml_array);
}  

?>

Re: Securenet Payment System

Posted: Wed May 04, 2011 12:35 am
by vegascoop
I am attaching three sample PHP files provided by Securenet. This should dramatically decrease the time necessary for this project.

File 2:
REQUEST PROCESS.PHP
-------------------------

Code: Select all

<html>
<head>
<style>
.reqfield
{
	color:red;
	font-weight:bold;
}
td,span,tr,table,p,body,input,select
{
	font-size:11px;
	font-family:verdana,arial;
}
.note
{
	font-size:9px;
	font-family:verdana,arial;
}
h1
{
	font-size:14px;
	font-family:verdana,arial;
	font-weight:bold;
}
h2
{
	font-size:13px;
	font-family:verdana,arial;
	font-weight:bold;
}
h3
{
	font-size:12px;
	font-family:verdana,arial;
	font-weight:bold;
}
</style>
</head>
<body>
<?php
require_once("class_gateway.php");
	if ($_POST["check"] != "")
	{
		$request["DCI"] 							= "0";
		$request["INSTALLMENT_SEQUENCENUM"] 		= "0";
		$request["OVERRIDE_FROM"] 					= "0";
		$request["RETAIL_LANENUM"] 					= "0";
		$request["TOTAL_INSTALLMENTCOUNT"] 			= "0";
		$request["TRANSACTION_SERVICE"] 			= "0";
		
		$request["AMOUNT"] 							= $_POST["transamount"];
		$request["CARD"]["CARDCODE"] 				= $_POST["cvvc"];
		$request["CARD"]["CARDNUMBER"] 				= $_POST["creditcardnum"];
		$request["CARD"]["EXPDATE"] 				= $_POST["ExpMonth"] ."".$_POST["ExpYear"];
		$request["CODE"] 							= $_POST["transactiontype"];
		$request["MERCHANT_KEY"]["GROUPID"] 		= "0";
		$request["MERCHANT_KEY"]["SECUREKEY"] 		= $_POST["securekey"];
		$request["MERCHANT_KEY"]["SECURENETID"] 	= $_POST["securenetid"];
		$request["METHOD"] 							= "CC";
		$request["ORDERID"] 						= $_POST["orderid"];
		$transactionType = $_POST["transactiontype"];
		if ($transactionType == "0200" || $transactionType == "0400" || $transactionType == "0300" || $transactionType == "0600")
		{
			$request["AUTHCODE"]						= $_POST["authroizationcode"];
		}
		else
		{
			$request["AUTHCODE"]						= "";
		}
		if ($transactionType == "0200" || $transactionType == "0400" || $transactionType == "0500")
		{	
			$request["REF_TRANSID"] 					= $_POST["transactionid"];
		}
		else
		{
			$request["REF_TRANSID"] 					= "";
		}
		if($_POST["istest"] == "1")
		{
			$request["TEST"] 							= $_POST["TRUE"];
		}
		else
		{
			$request["TEST"] 							= $_POST["FALSE"];
		}		
		try
		{
			$gw = new Gateway(3);
			$response = $gw->ProcessTransaction($request);
		}
		catch(Exception $e)
		{
			echo "Exception: ".$e->getMessage()."\n";
		}
		echo "<br><strong>Transaction Response</strong><br><br>Response Reason Code = " . $response->ProcessTransactionResult->TRANSACTIONRESPONSE->RESPONSE_CODE;
		echo "<br>Response Reason Text = " . $response->ProcessTransactionResult->TRANSACTIONRESPONSE->RESPONSE_REASON_TEXT;
		if($response->ProcessTransactionResult->TRANSACTIONRESPONSE->RESPONSE_CODE == "1")
		{
			echo "<br>Authroization Code = " . $response->ProcessTransactionResult->TRANSACTIONRESPONSE->AUTHCODE;
			echo "<br>Transaction Id = " . $response->ProcessTransactionResult->TRANSACTIONRESPONSE->TRANSACTIONID;
		}	
		echo "<br><br><a href='sample_code.php'>Try again</a>";
	}
	else
	{
		Header("Location: sample_code.php");;
	}
?>
</body>
</html>

Re: Securenet Payment System

Posted: Wed May 04, 2011 12:39 am
by vegascoop
I am attaching three sample PHP files provided by Securenet. This should dramatically decrease the time necessary for this project.

File 3:
SAMPLE CODE.PHP
-------------------------

Code: Select all

<html>
<head>
<style>
.reqfield
{
	color:red;
	font-weight:bold;
}
td,span,tr,table,p,body,input,select
{
	font-size:11px;
	font-family:verdana,arial;
}
.note
{
	font-size:9px;
	font-family:verdana,arial;
}
h1
{
	font-size:14px;
	font-family:verdana,arial;
	font-weight:bold;
}
h2
{
	font-size:13px;
	font-family:verdana,arial;
	font-weight:bold;
}
h3
{
	font-size:12px;
	font-family:verdana,arial;
	font-weight:bold;
}
</style>
<script>
	function stripHtml(stringToStrip)
	{
		return stringToStrip.replace(/(<([^>]+)>)/ig,""); 
	}

	function trimString(stringToTrim)
	{
		return stringToTrim.replace(/\s+$/,"");
	}
	function checkInputs()
	{
		document.getElementById("securenetid").value = stripHtml(trimString(document.getElementById("securenetid").value));
		if(document.getElementById("securenetid").value.length==0)
		{
			alert("SecureNET Id is a required field");
			document.getElementById("securenetid").focus();
			return false;
		}
		if(isNaN(document.getElementById("securenetid").value))
		{
		    alert("SecureNET Id is a numeric field");
			document.getElementById("securenetid").focus();
			return false;
		}
		document.getElementById("securekey").value = stripHtml(trimString(document.getElementById("securekey").value));
		if(document.getElementById("securekey").value.length==0)
		{
			alert("SecureNET Key is a required field");
			document.getElementById("securekey").focus();
			return false;
		}
		document.getElementById("creditcardnum").value = stripHtml(trimString(document.getElementById("creditcardnum").value));
		if(document.getElementById("creditcardnum").value.length==0)
		{
			alert("Credit Card Number is a required field");
			document.getElementById("creditcardnum").focus();
			return false;
		}
		document.getElementById("cvvc").value = stripHtml(trimString(document.getElementById("cvvc").value));
		if(document.getElementById("cvvc").value.length==0)
		{
			alert("CVVC is a required field");
			document.getElementById("cvvc").focus();
			return false;
		}
		var currentTime = new Date();
		var month = currentTime.getMonth() + 1;
		var year = currentTime.getYear();
		var length = (""+month).length;
		if(length==1)
		{
			month = "0"+month;
		}
		length = (""+year).length;
		if(length==4)
		{
			year = (""+year).substr(2);
		}
		else if (length==3)
		{
			year = (""+year).substr(1);
		}
		if(year==document.getElementById("ExpYear").value)
		{
			if(document.getElementById("ExpMonth").value <= month)
			{
				alert("Your Credit card is Expired.");
				return false;
			}
		}
		document.getElementById("transamount").value = stripHtml(trimString(document.getElementById("transamount").value));
		if(document.getElementById("transamount").value.length==0)
		{
			alert("Transaction Amount is a required field");
			document.getElementById("transamount").focus();
			return false;
		}
		if(isNaN(document.getElementById("transamount").value))
		{
		    alert("Transaction Amount is a numeric field");
			document.getElementById("transamount").focus();
			return false;
		}
		document.getElementById("orderid").value = stripHtml(trimString(document.getElementById("orderid").value));
		if(document.getElementById("orderid").value.length==0)
		{
			alert("Order Id is a required field");
			document.getElementById("orderid").focus();
			return false;
		}
		var valueofdropdown = document.getElementById("transactiontype").value;
		if (valueofdropdown == "0200" || valueofdropdown == "0400" || valueofdropdown == "0300" || valueofdropdown == "0600")
		{
			document.getElementById("authroizationcode").value = stripHtml(trimString(document.getElementById("authroizationcode").value));
			if(document.getElementById("authroizationcode").value.length==0)
			{
				alert("Authorization Code is a required field");
				document.getElementById("authroizationcode").focus();
				return false;
			}
		}
		if (valueofdropdown == "0200" || valueofdropdown == "0400" || valueofdropdown == "0500")
		{
			document.getElementById("transactionid").value = stripHtml(trimString(document.getElementById("transactionid").value));
			if(document.getElementById("transactionid").value.length==0)
			{
				alert("Transaction Id is a required field");
				document.getElementById("transactionid").focus();
				return false;
			}
		}

	}
	function visible_invisible()
	{
		var valueofdropdown = document.getElementById("transactiontype").value;
		if(valueofdropdown =="0100" || valueofdropdown =="0000")
		{
			document.getElementById("trAuthCode").style.display="none";
			document.getElementById("trTransactionID").style.display="none";
		}
		else if(valueofdropdown=="0200" || valueofdropdown=="0400")
		{
			document.getElementById("trAuthCode").style.display="block";
			document.getElementById("trTransactionID").style.display="block";
		}
		else if(valueofdropdown=="0300" || valueofdropdown=="0600")
		{
			document.getElementById("trAuthCode").style.display="block";
			document.getElementById("trTransactionID").style.display="none";
		}
		else if(valueofdropdown=="0500")
		{
			document.getElementById("trAuthCode").style.display="none";
			document.getElementById("trTransactionID").style.display="block";
		}
	}
</script>
</head>
<body>
<h1>Sample application for SECURENET API</h1>
<form method="post" action="request_process.php" onSubmit="return checkInputs()">
	<table cellspacing="0" cellpadding="2" border="0">
		<tr>
			<td>Securenet ID</td>
			<td><input id="securenetid" name="securenetid" size="40" /></td>
		</tr>
		<tr>
			<td>Securenet Key</td>
			<td><input id="securekey" name="securekey" size="40" /></td>
		</tr>
		<tr>
			<td>Is Test?</td>
			<td><input id="istest" name="istest" type="checkbox" value="1" /></td>
		</tr>
		<tr>
			<td>Transaction Type</td>
			<td><select name="transactiontype" id="transactiontype" onChange="visible_invisible();">
				<option value="0100">AUTH_CAPTURE</option>
				<option value="0000">AUTH_ONLY</option>
				<option value="0200">PRIOR_AUTH_CAPTURE</option>
				<option value="0300">CAPTURE_ONLY</option>
				<option value="0500">CREDIT</option>
				<option value="0600">FORCE_CREDIT</option>
				<option value="0400">VOID</option>
				</select>
			</td>
		</tr>
		<tr>
			<td>Credit Card Number</td>
			<td><input id="creditcardnum" name="creditcardnum" size="40" value="4444333322221111" /></td>
		</tr>
		<tr>
			<td>CVVC</td>
			<td><input id="cvvc" name="cvvc" size="40" value="999" /></td>
		</tr>
		<tr>
			<td>Transaction Amount</td>
			<td><input id="transamount" name="transamount" size="40" value="1.0" /></td>
		</tr>
		<tr>
			<td>Card Expiry</td>
			<td><select name="ExpMonth" id="ExpMonth">
				<option value="01">Jan</option>
				<option value="02">Feb</option>
				<option value="03">Mar</option>
				<option value="04">Apr</option>
				<option value="05">May</option>
				<option value="06">Jun</option>
				<option value="07">Jul</option>
				<option value="08">Aug</option>
				<option value="09">Sep</option>
				<option value="10">Oct</option>
				<option value="11">Nov</option>
				<option value="12">Dec</option>
				</select>
				<select name="ExpYear" id="ExpYear">
				<?php
				$curryearX = date("Y");
				for ($x=0; $x<=10; $x++)
				{
				?>
				<option value="<?php echo substr(($curryearX+$x),2); ?>"><?php  echo ($curryearX+$x); ?></option>
				<?php
				} 
				?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Order ID</td>
			<td><input id="orderid" name="orderid" size="40" value="<?php echo date("Ymdhis"); ?>" /></td>
		</tr>
		<tr id="trAuthCode" name="trAuthCode">
			<td>Authorization Code</td>
			<td><input id="authroizationcode" name="authroizationcode" size="40" /></td>
		</tr>
		<tr id="trTransactionID" name="trTransactionID">
			<td>Transaction ID</td>
			<td><input id="transactionid" name="transactionid" size="40" /></td>
		</tr>
		<tr>
			<td></td><td><input type="submit" value="Process Request" id="check" name="check" /></td>
		</tr>
	</table>
	<br>
	<script>
	visible_invisible();
	</script>
</form>
</body>
</html>

Re: Securenet Payment System

Posted: Wed May 04, 2011 1:52 am
by Qphoria
I looked at the API.. it looks to be overly complex. I can take a look at it in about a week

Re: Securenet Payment System

Posted: Wed May 04, 2011 11:33 am
by vegascoop
Qphoria,

Thanks for taking a look. If you have time, look at the example PHP code as well.

SecureNet is owned by and is being promoted by Wells Fargo Bank (one of the big four US banks)-- so it may be worth your time to take a second look.

The project is not urgent, but I am certainly willing to pay whoever can get it done.

Re: Securenet Payment System

Posted: Thu May 05, 2011 7:05 am
by vegascoop
After looking at different options, I think just using Authorize.net as the Gateway is going to be the easiest and least expensive solution.

When there are more requests for this payment system in the future, I am sure someone will create a plugin.