//More examples this http://curl.haxx.se/docs/httpscripting.html
curl -X POST https://sandbox-portal.zift.io/gates/onboarding? \
-d "requestType=create" \
-d "userName={{userName}}" \
-d "password={{password}}" \
-d "profileId=11257624370" \
-d "resellerId=1" \
-d "portfolioId=100" \
-d "feeTemplateId=100028" \
-d "processingConfigurationScript=zift10" \
-d "merchantType=M" \
-d "merchantId=" \
-d "notifyURL=" \
-d "cancelURL=" \
-d "returnURL=" \
-d "returnURLPolicy=page" \
-d "isEmbedded=0" \
-d "pageFormat=" \
-d "officer.firstName=Tony" \
-d "officer.lastName=Stark" \
-d "officer.street1=41 E 300 N" \
-d "officer.street2=" \
-d "officer.city=Spanish Fork" \
-d "officer.state=UT" \
-d "officer.zipCode=84653" \
-d "officer.phone=5555551212" \
-d "[email protected]" \
-d "officer.birthDate=19670210" \
-d "officer.socialSecurity=123456789" \
-d "officer.countryCode=US" \
-d "officer.stakePercentage=10" \
-d "owner.1.firstName=First" \
-d "owner.1.lastName=Owner" \
-d "owner.1.street1=41 E 300 N" \
-d "owner.1.street2=" \
-d "owner.1.city=Spanish Fork" \
-d "owner.1.state=UT" \
-d "owner.1.zipCode=84653" \
-d "owner.1.phone=5555551212" \
-d "[email protected]" \
-d "owner.1.birthDate=19670210" \
-d "owner.1.socialSecurity=123456789" \
-d "owner.1.countryCode=US" \
-d "owner.1.stakePercentage=200" \
-d "owner.2.firstName=Second" \
-d "owner.2.lastName=Owner" \
-d "owner.2.street1=41 E 300 N" \
-d "owner.2.street2=" \
-d "owner.2.city=Spanish Fork" \
-d "owner.2.state=UT" \
-d "owner.2.zipCode=84653" \
-d "owner.2.phone=5555551212" \
-d "[email protected]" \
-d "owner.2.birthDate=19670210" \
-d "owner.2.socialSecurity=123456789" \
-d "owner.2.countryCode=US" \
-d "owner.2.stakePercentage=10" \
-d "owner.3.firstName=Third" \
-d "owner.3.lastName=Owner" \
-d "owner.3.street1=41 E 300 N" \
-d "owner.3.street2=" \
-d "owner.3.city=Spanish Fork" \
-d "owner.3.state=UT" \
-d "owner.3.zipCode=84653" \
-d "owner.3.phone=5555551212" \
-d "[email protected]" \
-d "owner.3.birthDate=19670210" \
-d "owner.3.socialSecurity=123456789" \
-d "owner.3.countryCode=US" \
-d "owner.3.stakePercentage=10" \
-d "owner.4.firstName=Fourth" \
-d "owner.4.lastName=Owner" \
-d "owner.4.street1=41 E 300 N" \
-d "owner.4.street2=" \
-d "owner.4.city=Spanish Fork" \
-d "owner.4.state=UT" \
-d "owner.4.zipCode=84653" \
-d "owner.4.phone=5555551212" \
-d "[email protected]" \
-d "owner.4.birthDate=19670210" \
-d "owner.4.socialSecurity=123456789" \
-d "owner.4.countryCode=US" \
-d "owner.4.stakePercentage=10" \
-d "business.businessName=Start Industries" \
-d "business.legalName=Start Industries" \
-d "business.street1=41 E 300 N" \
-d "business.street2=" \
-d "business.city=Anywhere" \
-d "business.state=CT" \
-d "business.zipCode=06000" \
-d "business.timeZoneCode=EST" \
-d "business.descriptorPhone=8604500119" \
-d "[email protected]" \
-d "business.webSite=" \
-d "business.taxId=147852369" \
-d "business.ownershipStructureType=C" \
-d "business.description=Ghostbusting" \
-d "estimates.annualCardsVolume=111111" \
-d "estimates.annualDirectDebitVolume=222222" \
-d "estimates.avgCardsTransactionAmount=2222" \
-d "estimates.avgDirectDebitTransactionAmount=1111" \
-d "estimates.maxTransactionAmount=12123" \
-d "business.countryCode=US" \
-d "business.merchantCategoryCode=7399" \
-d "business.currencyCode=USD" \
-d "deposit.bankName=Stark Bank" \
-d "deposit.holderName=Tony Stark" \
-d "deposit.accountType=C" \
-d "deposit.routingNumber=324377516" \
-d "deposit.accountNumber=123456789" \
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
public class PostExample {
private static int CONNECT_TIMEOUT = 10 * 1000;
private static int READ_TIMEOUT = 1 * 60 * 1000;
private static String EMPTY = "";
public static void main (String[] args) throws IOException{
System.out.println(sendPOST("https://sandbox-portal.zift.io/gates/onboarding?",
"&requestType=create"
+ "&userName={{userName}}"
+ "&password={{password}}"
+ "&profileId=11257624370"
+ "&resellerId=1"
+ "&portfolioId=100"
+ "&feeTemplateId=100028"
+ "&processingConfigurationScript=zift10"
+ "&merchantType=M"
+ "&merchantId="
+ "¬ifyURL="
+ "&cancelURL="
+ "&returnURL="
+ "&returnURLPolicy=page"
+ "&isEmbedded=0"
+ "&pageFormat="
+ "&officer.firstName=Tony"
+ "&officer.lastName=Stark"
+ "&officer.street1=41 E 300 N"
+ "&officer.street2="
+ "&officer.city=Spanish Fork"
+ "&officer.state=UT"
+ "&officer.zipCode=84653"
+ "&officer.phone=5555551212"
+ "[email protected]"
+ "&officer.birthDate=19670210"
+ "&officer.socialSecurity=123456789"
+ "&officer.countryCode=US"
+ "&officer.stakePercentage=10"
+ "&owner.1.firstName=First"
+ "&owner.1.lastName=Owner"
+ "&owner.1.street1=41 E 300 N"
+ "&owner.1.street2="
+ "&owner.1.city=Spanish Fork"
+ "&owner.1.state=UT"
+ "&owner.1.zipCode=84653"
+ "&owner.1.phone=5555551212"
+ "[email protected]"
+ "&owner.1.birthDate=19670210"
+ "&owner.1.socialSecurity=123456789"
+ "&owner.1.countryCode=US"
+ "&owner.1.stakePercentage=200"
+ "&owner.2.firstName=Second"
+ "&owner.2.lastName=Owner"
+ "&owner.2.street1=41 E 300 N"
+ "&owner.2.street2="
+ "&owner.2.city=Spanish Fork"
+ "&owner.2.state=UT"
+ "&owner.2.zipCode=84653"
+ "&owner.2.phone=5555551212"
+ "[email protected]"
+ "&owner.2.birthDate=19670210"
+ "&owner.2.socialSecurity=123456789"
+ "&owner.2.countryCode=US"
+ "&owner.2.stakePercentage=10"
+ "&owner.3.firstName=Third"
+ "&owner.3.lastName=Owner"
+ "&owner.3.street1=41 E 300 N"
+ "&owner.3.street2="
+ "&owner.3.city=Spanish Fork"
+ "&owner.3.state=UT"
+ "&owner.3.zipCode=84653"
+ "&owner.3.phone=5555551212"
+ "[email protected]"
+ "&owner.3.birthDate=19670210"
+ "&owner.3.socialSecurity=123456789"
+ "&owner.3.countryCode=US"
+ "&owner.3.stakePercentage=10"
+ "&owner.4.firstName=Fourth"
+ "&owner.4.lastName=Owner"
+ "&owner.4.street1=41 E 300 N"
+ "&owner.4.street2="
+ "&owner.4.city=Spanish Fork"
+ "&owner.4.state=UT"
+ "&owner.4.zipCode=84653"
+ "&owner.4.phone=5555551212"
+ "[email protected]"
+ "&owner.4.birthDate=19670210"
+ "&owner.4.socialSecurity=123456789"
+ "&owner.4.countryCode=US"
+ "&owner.4.stakePercentage=10"
+ "&business.businessName=Start Industries"
+ "&business.legalName=Start Industries"
+ "&business.street1=41 E 300 N"
+ "&business.street2="
+ "&business.city=Anywhere"
+ "&business.state=CT"
+ "&business.zipCode=06000"
+ "&business.timeZoneCode=EST"
+ "&business.descriptorPhone=8604500119"
+ "[email protected]"
+ "&business.webSite="
+ "&business.taxId=147852369"
+ "&business.ownershipStructureType=C"
+ "&business.description=Ghostbusting"
+ "&estimates.annualCardsVolume=111111"
+ "&estimates.annualDirectDebitVolume=222222"
+ "&estimates.avgCardsTransactionAmount=2222"
+ "&estimates.avgDirectDebitTransactionAmount=1111"
+ "&estimates.maxTransactionAmount=12123"
+ "&business.countryCode=US"
+ "&business.merchantCategoryCode=7399"
+ "&business.currencyCode=USD"
+ "&deposit.bankName=Stark Bank"
+ "&deposit.holderName=Tony Stark"
+ "&deposit.accountType=C"
+ "&deposit.routingNumber=324377516"
+ "&deposit.accountNumber=123456789"
));
}
public static String sendPOST(String url, String data) throws IOException{
HttpURLConnection conn = null;
InputStream stream = null;
URL urlLink = new URL(url);
OutputStreamWriter writer = null;
conn = (HttpURLConnection)urlLink.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestMethod("POST");
writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(data);
writer.flush();
writer.close();
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
stream = conn.getInputStream();
} else {
stream = conn.getErrorStream();
}
if (stream == null){
System.out.println("Response code is " + conn.getResponseCode());
return EMPTY;
}
return stream2String(stream);
}
private static String stream2String(InputStream is) throws IOException{
StringBuilder sb = new StringBuilder(8192);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line = null;
while ((line = br.readLine())!= null){
sb.append(line);
}
return sb.toString();
}
}
$url = 'https://sandbox-portal.zift.io/gates/onboarding?';
$data = array(
'requestType'=>'create',
'userName'=>'{{userName}}',
'password'=>'{{password}}',
'profileId'=>'11257624370',
'resellerId'=>'1',
'portfolioId'=>'100',
'feeTemplateId'=>'100028',
'processingConfigurationScript'=>'zift10',
'merchantType'=>'M',
'merchantId'=>'',
'notifyURL'=>'',
'cancelURL'=>'',
'returnURL'=>'',
'returnURLPolicy'=>'page',
'isEmbedded'=>'0',
'pageFormat'=>'',
'officer.firstName'=>'Tony',
'officer.lastName'=>'Stark',
'officer.street1'=>'41 E 300 N',
'officer.street2'=>'',
'officer.city'=>'Spanish Fork',
'officer.state'=>'UT',
'officer.zipCode'=>'84653',
'officer.phone'=>'5555551212',
'officer.email'=>'[email protected]',
'officer.birthDate'=>'19670210',
'officer.socialSecurity'=>'123456789',
'officer.countryCode'=>'US',
'officer.stakePercentage'=>'10',
'owner.1.firstName'=>'First',
'owner.1.lastName'=>'Owner',
'owner.1.street1'=>'41 E 300 N',
'owner.1.street2'=>'',
'owner.1.city'=>'Spanish Fork',
'owner.1.state'=>'UT',
'owner.1.zipCode'=>'84653',
'owner.1.phone'=>'5555551212',
'owner.1.email'=>'[email protected]',
'owner.1.birthDate'=>'19670210',
'owner.1.socialSecurity'=>'123456789',
'owner.1.countryCode'=>'US',
'owner.1.stakePercentage'=>'200',
'owner.2.firstName'=>'Second',
'owner.2.lastName'=>'Owner',
'owner.2.street1'=>'41 E 300 N',
'owner.2.street2'=>'',
'owner.2.city'=>'Spanish Fork',
'owner.2.state'=>'UT',
'owner.2.zipCode'=>'84653',
'owner.2.phone'=>'5555551212',
'owner.2.email'=>'[email protected]',
'owner.2.birthDate'=>'19670210',
'owner.2.socialSecurity'=>'123456789',
'owner.2.countryCode'=>'US',
'owner.2.stakePercentage'=>'10',
'owner.3.firstName'=>'Third',
'owner.3.lastName'=>'Owner',
'owner.3.street1'=>'41 E 300 N',
'owner.3.street2'=>'',
'owner.3.city'=>'Spanish Fork',
'owner.3.state'=>'UT',
'owner.3.zipCode'=>'84653',
'owner.3.phone'=>'5555551212',
'owner.3.email'=>'[email protected]',
'owner.3.birthDate'=>'19670210',
'owner.3.socialSecurity'=>'123456789',
'owner.3.countryCode'=>'US',
'owner.3.stakePercentage'=>'10',
'owner.4.firstName'=>'Fourth',
'owner.4.lastName'=>'Owner',
'owner.4.street1'=>'41 E 300 N',
'owner.4.street2'=>'',
'owner.4.city'=>'Spanish Fork',
'owner.4.state'=>'UT',
'owner.4.zipCode'=>'84653',
'owner.4.phone'=>'5555551212',
'owner.4.email'=>'[email protected]',
'owner.4.birthDate'=>'19670210',
'owner.4.socialSecurity'=>'123456789',
'owner.4.countryCode'=>'US',
'owner.4.stakePercentage'=>'10',
'business.businessName'=>'Start Industries',
'business.legalName'=>'Start Industries',
'business.street1'=>'41 E 300 N',
'business.street2'=>'',
'business.city'=>'Anywhere',
'business.state'=>'CT',
'business.zipCode'=>'06000',
'business.timeZoneCode'=>'EST',
'business.descriptorPhone'=>'8604500119',
'business.email'=>'[email protected]',
'business.webSite'=>'',
'business.taxId'=>'147852369',
'business.ownershipStructureType'=>'C',
'business.description'=>'Ghostbusting',
'estimates.annualCardsVolume'=>'111111',
'estimates.annualDirectDebitVolume'=>'222222',
'estimates.avgCardsTransactionAmount'=>'2222',
'estimates.avgDirectDebitTransactionAmount'=>'1111',
'estimates.maxTransactionAmount'=>'12123',
'business.countryCode'=>'US',
'business.merchantCategoryCode'=>'7399',
'business.currencyCode'=>'USD',
'deposit.bankName'=>'Stark Bank',
'deposit.holderName'=>'Tony Stark',
'deposit.accountType'=>'C',
'deposit.routingNumber'=>'324377516',
'deposit.accountNumber'=>'123456789',
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
using System;
using System.IO;
using System.Net;
using System.Text;
namespace PostExample
{
class Program
{
private static int TIMEOUT = 1 * 60 * 1000;
static void Main(string[] args)
{
System.Console.WriteLine(SendPOST("https://sandbox-portal.zift.io/gates/onboarding?",
"requestType=create"
+ "&userName={{userName}}"
+ "&password={{password}}"
+ "&profileId=11257624370"
+ "&resellerId=1"
+ "&portfolioId=100"
+ "&feeTemplateId=100028"
+ "&processingConfigurationScript=zift10"
+ "&merchantType=M"
+ "&merchantId="
+ "¬ifyURL="
+ "&cancelURL="
+ "&returnURL="
+ "&returnURLPolicy=page"
+ "&isEmbedded=0"
+ "&pageFormat="
+ "&officer.firstName=Tony"
+ "&officer.lastName=Stark"
+ "&officer.street1=41 E 300 N"
+ "&officer.street2="
+ "&officer.city=Spanish Fork"
+ "&officer.state=UT"
+ "&officer.zipCode=84653"
+ "&officer.phone=5555551212"
+ "[email protected]"
+ "&officer.birthDate=19670210"
+ "&officer.socialSecurity=123456789"
+ "&officer.countryCode=US"
+ "&officer.stakePercentage=10"
+ "&owner.1.firstName=First"
+ "&owner.1.lastName=Owner"
+ "&owner.1.street1=41 E 300 N"
+ "&owner.1.street2="
+ "&owner.1.city=Spanish Fork"
+ "&owner.1.state=UT"
+ "&owner.1.zipCode=84653"
+ "&owner.1.phone=5555551212"
+ "[email protected]"
+ "&owner.1.birthDate=19670210"
+ "&owner.1.socialSecurity=123456789"
+ "&owner.1.countryCode=US"
+ "&owner.1.stakePercentage=200"
+ "&owner.2.firstName=Second"
+ "&owner.2.lastName=Owner"
+ "&owner.2.street1=41 E 300 N"
+ "&owner.2.street2="
+ "&owner.2.city=Spanish Fork"
+ "&owner.2.state=UT"
+ "&owner.2.zipCode=84653"
+ "&owner.2.phone=5555551212"
+ "[email protected]"
+ "&owner.2.birthDate=19670210"
+ "&owner.2.socialSecurity=123456789"
+ "&owner.2.countryCode=US"
+ "&owner.2.stakePercentage=10"
+ "&owner.3.firstName=Third"
+ "&owner.3.lastName=Owner"
+ "&owner.3.street1=41 E 300 N"
+ "&owner.3.street2="
+ "&owner.3.city=Spanish Fork"
+ "&owner.3.state=UT"
+ "&owner.3.zipCode=84653"
+ "&owner.3.phone=5555551212"
+ "[email protected]"
+ "&owner.3.birthDate=19670210"
+ "&owner.3.socialSecurity=123456789"
+ "&owner.3.countryCode=US"
+ "&owner.3.stakePercentage=10"
+ "&owner.4.firstName=Fourth"
+ "&owner.4.lastName=Owner"
+ "&owner.4.street1=41 E 300 N"
+ "&owner.4.street2="
+ "&owner.4.city=Spanish Fork"
+ "&owner.4.state=UT"
+ "&owner.4.zipCode=84653"
+ "&owner.4.phone=5555551212"
+ "[email protected]"
+ "&owner.4.birthDate=19670210"
+ "&owner.4.socialSecurity=123456789"
+ "&owner.4.countryCode=US"
+ "&owner.4.stakePercentage=10"
+ "&business.businessName=Start Industries"
+ "&business.legalName=Start Industries"
+ "&business.street1=41 E 300 N"
+ "&business.street2="
+ "&business.city=Anywhere"
+ "&business.state=CT"
+ "&business.zipCode=06000"
+ "&business.timeZoneCode=EST"
+ "&business.descriptorPhone=8604500119"
+ "[email protected]"
+ "&business.webSite="
+ "&business.taxId=147852369"
+ "&business.ownershipStructureType=C"
+ "&business.description=Ghostbusting"
+ "&estimates.annualCardsVolume=111111"
+ "&estimates.annualDirectDebitVolume=222222"
+ "&estimates.avgCardsTransactionAmount=2222"
+ "&estimates.avgDirectDebitTransactionAmount=1111"
+ "&estimates.maxTransactionAmount=12123"
+ "&business.countryCode=US"
+ "&business.merchantCategoryCode=7399"
+ "&business.currencyCode=USD"
+ "&deposit.bankName=Stark Bank"
+ "&deposit.holderName=Tony Stark"
+ "&deposit.accountType=C"
+ "&deposit.routingNumber=324377516"
+ "&deposit.accountNumber=123456789"
));
}
public static String SendPOST(String url, String data)
{
WebRequest request = WebRequest.Create(url);
byte[] byteArray = Encoding.UTF8.GetBytes(data);
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
request.Timeout = TIMEOUT;
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
return responseFromServer;
}
catch (WebExeption e)
{
return e.Message;
}
}
}
}
'More examples https://msdn.microsoft.com/en-us/library/vstudio/debx8sh9(v=vs.100).aspx
'The command line for compiling the program is the following
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe /t:exe /debug+ /optionstrict+ /out:.\Vb_example.exe Vb_example.vb
Imports System
Imports System.IO
Imports System.Net
Imports System.Text
Namespace Examples.System.Net
Public Class WebRequestPostExample
Public Shared Sub Main()
Dim request As WebRequest = WebRequest.Create("https://sandbox-portal.zift.io/gates/onboarding?")
request.Method = "POST"
Dim postData As String
postData = "requestType=create"
postData = postData + "&userName={{userName}}"
postData = postData + "&password={{password}}"
postData = postData + "&profileId=11257624370"
postData = postData + "&resellerId=1"
postData = postData + "&portfolioId=100"
postData = postData + "&feeTemplateId=100028"
postData = postData + "&processingConfigurationScript=zift10"
postData = postData + "&merchantType=M"
postData = postData + "&merchantId="
postData = postData + "¬ifyURL="
postData = postData + "&cancelURL="
postData = postData + "&returnURL="
postData = postData + "&returnURLPolicy=page"
postData = postData + "&isEmbedded=0"
postData = postData + "&pageFormat="
postData = postData + "&officer.firstName=Tony"
postData = postData + "&officer.lastName=Stark"
postData = postData + "&officer.street1=41 E 300 N"
postData = postData + "&officer.street2="
postData = postData + "&officer.city=Spanish Fork"
postData = postData + "&officer.state=UT"
postData = postData + "&officer.zipCode=84653"
postData = postData + "&officer.phone=5555551212"
postData = postData + "[email protected]"
postData = postData + "&officer.birthDate=19670210"
postData = postData + "&officer.socialSecurity=123456789"
postData = postData + "&officer.countryCode=US"
postData = postData + "&officer.stakePercentage=10"
postData = postData + "&owner.1.firstName=First"
postData = postData + "&owner.1.lastName=Owner"
postData = postData + "&owner.1.street1=41 E 300 N"
postData = postData + "&owner.1.street2="
postData = postData + "&owner.1.city=Spanish Fork"
postData = postData + "&owner.1.state=UT"
postData = postData + "&owner.1.zipCode=84653"
postData = postData + "&owner.1.phone=5555551212"
postData = postData + "[email protected]"
postData = postData + "&owner.1.birthDate=19670210"
postData = postData + "&owner.1.socialSecurity=123456789"
postData = postData + "&owner.1.countryCode=US"
postData = postData + "&owner.1.stakePercentage=200"
postData = postData + "&owner.2.firstName=Second"
postData = postData + "&owner.2.lastName=Owner"
postData = postData + "&owner.2.street1=41 E 300 N"
postData = postData + "&owner.2.street2="
postData = postData + "&owner.2.city=Spanish Fork"
postData = postData + "&owner.2.state=UT"
postData = postData + "&owner.2.zipCode=84653"
postData = postData + "&owner.2.phone=5555551212"
postData = postData + "[email protected]"
postData = postData + "&owner.2.birthDate=19670210"
postData = postData + "&owner.2.socialSecurity=123456789"
postData = postData + "&owner.2.countryCode=US"
postData = postData + "&owner.2.stakePercentage=10"
postData = postData + "&owner.3.firstName=Third"
postData = postData + "&owner.3.lastName=Owner"
postData = postData + "&owner.3.street1=41 E 300 N"
postData = postData + "&owner.3.street2="
postData = postData + "&owner.3.city=Spanish Fork"
postData = postData + "&owner.3.state=UT"
postData = postData + "&owner.3.zipCode=84653"
postData = postData + "&owner.3.phone=5555551212"
postData = postData + "[email protected]"
postData = postData + "&owner.3.birthDate=19670210"
postData = postData + "&owner.3.socialSecurity=123456789"
postData = postData + "&owner.3.countryCode=US"
postData = postData + "&owner.3.stakePercentage=10"
postData = postData + "&owner.4.firstName=Fourth"
postData = postData + "&owner.4.lastName=Owner"
postData = postData + "&owner.4.street1=41 E 300 N"
postData = postData + "&owner.4.street2="
postData = postData + "&owner.4.city=Spanish Fork"
postData = postData + "&owner.4.state=UT"
postData = postData + "&owner.4.zipCode=84653"
postData = postData + "&owner.4.phone=5555551212"
postData = postData + "[email protected]"
postData = postData + "&owner.4.birthDate=19670210"
postData = postData + "&owner.4.socialSecurity=123456789"
postData = postData + "&owner.4.countryCode=US"
postData = postData + "&owner.4.stakePercentage=10"
postData = postData + "&business.businessName=Start Industries"
postData = postData + "&business.legalName=Start Industries"
postData = postData + "&business.street1=41 E 300 N"
postData = postData + "&business.street2="
postData = postData + "&business.city=Anywhere"
postData = postData + "&business.state=CT"
postData = postData + "&business.zipCode=06000"
postData = postData + "&business.timeZoneCode=EST"
postData = postData + "&business.descriptorPhone=8604500119"
postData = postData + "[email protected]"
postData = postData + "&business.webSite="
postData = postData + "&business.taxId=147852369"
postData = postData + "&business.ownershipStructureType=C"
postData = postData + "&business.description=Ghostbusting"
postData = postData + "&estimates.annualCardsVolume=111111"
postData = postData + "&estimates.annualDirectDebitVolume=222222"
postData = postData + "&estimates.avgCardsTransactionAmount=2222"
postData = postData + "&estimates.avgDirectDebitTransactionAmount=1111"
postData = postData + "&estimates.maxTransactionAmount=12123"
postData = postData + "&business.countryCode=US"
postData = postData + "&business.merchantCategoryCode=7399"
postData = postData + "&business.currencyCode=USD"
postData = postData + "&deposit.bankName=Stark Bank"
postData = postData + "&deposit.holderName=Tony Stark"
postData = postData + "&deposit.accountType=C"
postData = postData + "&deposit.routingNumber=324377516"
postData = postData + "&deposit.accountNumber=123456789"
Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)
request.ContentType = "application/x-www-form-urlencoded"
request.ContentLength = byteArray.Length
Try
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(byteArray, 0, byteArray.Length)
dataStream.Close()
Dim response As WebResponse = request.GetResponse()
Console.WriteLine(CType(response, HttpWebResponse).StatusDescription)
dataStream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
Console.WriteLine(responseFromServer)
reader.Close()
dataStream.Close()
response.Close()
Catch Exc As WebExeption
Console.WriteLine(Exc.Message)
End Try
End Sub
End Class
End Namespace
# More examles http://ruby-doc.org/stdlib-2.1.1/libdoc/net/http/rdoc/Net/HTTP.html
require "net/https"
require "uri"
uri = URI.parse("https://sandbox-portal.zift.io/gates/onboarding?")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
post_params = {
'requestType'=>'create',
'userName'=>'{{userName}}',
'password'=>'{{password}}',
'profileId'=>'11257624370',
'resellerId'=>'1',
'portfolioId'=>'100',
'feeTemplateId'=>'100028',
'processingConfigurationScript'=>'zift10',
'merchantType'=>'M',
'merchantId'=>'',
'notifyURL'=>'',
'cancelURL'=>'',
'returnURL'=>'',
'returnURLPolicy'=>'page',
'isEmbedded'=>'0',
'pageFormat'=>'',
'officer.firstName'=>'Tony',
'officer.lastName'=>'Stark',
'officer.street1'=>'41 E 300 N',
'officer.street2'=>'',
'officer.city'=>'Spanish Fork',
'officer.state'=>'UT',
'officer.zipCode'=>'84653',
'officer.phone'=>'5555551212',
'officer.email'=>'[email protected]',
'officer.birthDate'=>'19670210',
'officer.socialSecurity'=>'123456789',
'officer.countryCode'=>'US',
'officer.stakePercentage'=>'10',
'owner.1.firstName'=>'First',
'owner.1.lastName'=>'Owner',
'owner.1.street1'=>'41 E 300 N',
'owner.1.street2'=>'',
'owner.1.city'=>'Spanish Fork',
'owner.1.state'=>'UT',
'owner.1.zipCode'=>'84653',
'owner.1.phone'=>'5555551212',
'owner.1.email'=>'[email protected]',
'owner.1.birthDate'=>'19670210',
'owner.1.socialSecurity'=>'123456789',
'owner.1.countryCode'=>'US',
'owner.1.stakePercentage'=>'200',
'owner.2.firstName'=>'Second',
'owner.2.lastName'=>'Owner',
'owner.2.street1'=>'41 E 300 N',
'owner.2.street2'=>'',
'owner.2.city'=>'Spanish Fork',
'owner.2.state'=>'UT',
'owner.2.zipCode'=>'84653',
'owner.2.phone'=>'5555551212',
'owner.2.email'=>'[email protected]',
'owner.2.birthDate'=>'19670210',
'owner.2.socialSecurity'=>'123456789',
'owner.2.countryCode'=>'US',
'owner.2.stakePercentage'=>'10',
'owner.3.firstName'=>'Third',
'owner.3.lastName'=>'Owner',
'owner.3.street1'=>'41 E 300 N',
'owner.3.street2'=>'',
'owner.3.city'=>'Spanish Fork',
'owner.3.state'=>'UT',
'owner.3.zipCode'=>'84653',
'owner.3.phone'=>'5555551212',
'owner.3.email'=>'[email protected]',
'owner.3.birthDate'=>'19670210',
'owner.3.socialSecurity'=>'123456789',
'owner.3.countryCode'=>'US',
'owner.3.stakePercentage'=>'10',
'owner.4.firstName'=>'Fourth',
'owner.4.lastName'=>'Owner',
'owner.4.street1'=>'41 E 300 N',
'owner.4.street2'=>'',
'owner.4.city'=>'Spanish Fork',
'owner.4.state'=>'UT',
'owner.4.zipCode'=>'84653',
'owner.4.phone'=>'5555551212',
'owner.4.email'=>'[email protected]',
'owner.4.birthDate'=>'19670210',
'owner.4.socialSecurity'=>'123456789',
'owner.4.countryCode'=>'US',
'owner.4.stakePercentage'=>'10',
'business.businessName'=>'Start Industries',
'business.legalName'=>'Start Industries',
'business.street1'=>'41 E 300 N',
'business.street2'=>'',
'business.city'=>'Anywhere',
'business.state'=>'CT',
'business.zipCode'=>'06000',
'business.timeZoneCode'=>'EST',
'business.descriptorPhone'=>'8604500119',
'business.email'=>'[email protected]',
'business.webSite'=>'',
'business.taxId'=>'147852369',
'business.ownershipStructureType'=>'C',
'business.description'=>'Ghostbusting',
'estimates.annualCardsVolume'=>'111111',
'estimates.annualDirectDebitVolume'=>'222222',
'estimates.avgCardsTransactionAmount'=>'2222',
'estimates.avgDirectDebitTransactionAmount'=>'1111',
'estimates.maxTransactionAmount'=>'12123',
'business.countryCode'=>'US',
'business.merchantCategoryCode'=>'7399',
'business.currencyCode'=>'USD',
'deposit.bankName'=>'Stark Bank',
'deposit.holderName'=>'Tony Stark',
'deposit.accountType'=>'C',
'deposit.routingNumber'=>'324377516',
'deposit.accountNumber'=>'123456789',
}
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data(post_params)
response = http.request(request)
puts response.body
// You have to install module request - npm install request
var request = require('request');
var headers = {
'User-Agent': 'Super Agent/0.0.1',
'Content-Type': 'application/x-www-form-urlencoded'
}
var options = {
url: 'https://sandbox-portal.zift.io/gates/onboarding?',
method: 'POST',
headers: headers,
form: {
'requestType':'create',
'userName':'{{userName}}',
'password':'{{password}}',
'profileId':'11257624370',
'resellerId':'1',
'portfolioId':'100',
'feeTemplateId':'100028',
'processingConfigurationScript':'zift10',
'merchantType':'M',
'merchantId':'',
'notifyURL':'',
'cancelURL':'',
'returnURL':'',
'returnURLPolicy':'page',
'isEmbedded':'0',
'pageFormat':'',
'officer.firstName':'Tony',
'officer.lastName':'Stark',
'officer.street1':'41 E 300 N',
'officer.street2':'',
'officer.city':'Spanish Fork',
'officer.state':'UT',
'officer.zipCode':'84653',
'officer.phone':'5555551212',
'officer.email':'[email protected]',
'officer.birthDate':'19670210',
'officer.socialSecurity':'123456789',
'officer.countryCode':'US',
'officer.stakePercentage':'10',
'owner.1.firstName':'First',
'owner.1.lastName':'Owner',
'owner.1.street1':'41 E 300 N',
'owner.1.street2':'',
'owner.1.city':'Spanish Fork',
'owner.1.state':'UT',
'owner.1.zipCode':'84653',
'owner.1.phone':'5555551212',
'owner.1.email':'[email protected]',
'owner.1.birthDate':'19670210',
'owner.1.socialSecurity':'123456789',
'owner.1.countryCode':'US',
'owner.1.stakePercentage':'200',
'owner.2.firstName':'Second',
'owner.2.lastName':'Owner',
'owner.2.street1':'41 E 300 N',
'owner.2.street2':'',
'owner.2.city':'Spanish Fork',
'owner.2.state':'UT',
'owner.2.zipCode':'84653',
'owner.2.phone':'5555551212',
'owner.2.email':'[email protected]',
'owner.2.birthDate':'19670210',
'owner.2.socialSecurity':'123456789',
'owner.2.countryCode':'US',
'owner.2.stakePercentage':'10',
'owner.3.firstName':'Third',
'owner.3.lastName':'Owner',
'owner.3.street1':'41 E 300 N',
'owner.3.street2':'',
'owner.3.city':'Spanish Fork',
'owner.3.state':'UT',
'owner.3.zipCode':'84653',
'owner.3.phone':'5555551212',
'owner.3.email':'[email protected]',
'owner.3.birthDate':'19670210',
'owner.3.socialSecurity':'123456789',
'owner.3.countryCode':'US',
'owner.3.stakePercentage':'10',
'owner.4.firstName':'Fourth',
'owner.4.lastName':'Owner',
'owner.4.street1':'41 E 300 N',
'owner.4.street2':'',
'owner.4.city':'Spanish Fork',
'owner.4.state':'UT',
'owner.4.zipCode':'84653',
'owner.4.phone':'5555551212',
'owner.4.email':'[email protected]',
'owner.4.birthDate':'19670210',
'owner.4.socialSecurity':'123456789',
'owner.4.countryCode':'US',
'owner.4.stakePercentage':'10',
'business.businessName':'Start Industries',
'business.legalName':'Start Industries',
'business.street1':'41 E 300 N',
'business.street2':'',
'business.city':'Anywhere',
'business.state':'CT',
'business.zipCode':'06000',
'business.timeZoneCode':'EST',
'business.descriptorPhone':'8604500119',
'business.email':'[email protected]',
'business.webSite':'',
'business.taxId':'147852369',
'business.ownershipStructureType':'C',
'business.description':'Ghostbusting',
'estimates.annualCardsVolume':'111111',
'estimates.annualDirectDebitVolume':'222222',
'estimates.avgCardsTransactionAmount':'2222',
'estimates.avgDirectDebitTransactionAmount':'1111',
'estimates.maxTransactionAmount':'12123',
'business.countryCode':'US',
'business.merchantCategoryCode':'7399',
'business.currencyCode':'USD',
'deposit.bankName':'Stark Bank',
'deposit.holderName':'Tony Stark',
'deposit.accountType':'C',
'deposit.routingNumber':'324377516',
'deposit.accountNumber':'123456789'
}
}
request(options, function (error, response, body) {
if (!error && response.statusCode == 200) {
// Print out the response body
console.log(body)
}
})
#You have to install modul LWP::Protocol::https
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
my $req = $ua->post(
'https://sandbox-portal.zift.io/gates/onboarding?',
[
requestType=>'create',
userName=>'{{userName}}',
password=>'{{password}}',
profileId=>'11257624370',
resellerId=>'1',
portfolioId=>'100',
feeTemplateId=>'100028',
processingConfigurationScript=>'zift10',
merchantType=>'M',
merchantId=>'',
notifyURL=>'',
cancelURL=>'',
returnURL=>'',
returnURLPolicy=>'page',
isEmbedded=>'0',
pageFormat=>'',
officer.firstName=>'Tony',
officer.lastName=>'Stark',
officer.street1=>'41 E 300 N',
officer.street2=>'',
officer.city=>'Spanish Fork',
officer.state=>'UT',
officer.zipCode=>'84653',
officer.phone=>'5555551212',
officer.email=>'[email protected]',
officer.birthDate=>'19670210',
officer.socialSecurity=>'123456789',
officer.countryCode=>'US',
officer.stakePercentage=>'10',
owner.1.firstName=>'First',
owner.1.lastName=>'Owner',
owner.1.street1=>'41 E 300 N',
owner.1.street2=>'',
owner.1.city=>'Spanish Fork',
owner.1.state=>'UT',
owner.1.zipCode=>'84653',
owner.1.phone=>'5555551212',
owner.1.email=>'[email protected]',
owner.1.birthDate=>'19670210',
owner.1.socialSecurity=>'123456789',
owner.1.countryCode=>'US',
owner.1.stakePercentage=>'200',
owner.2.firstName=>'Second',
owner.2.lastName=>'Owner',
owner.2.street1=>'41 E 300 N',
owner.2.street2=>'',
owner.2.city=>'Spanish Fork',
owner.2.state=>'UT',
owner.2.zipCode=>'84653',
owner.2.phone=>'5555551212',
owner.2.email=>'[email protected]',
owner.2.birthDate=>'19670210',
owner.2.socialSecurity=>'123456789',
owner.2.countryCode=>'US',
owner.2.stakePercentage=>'10',
owner.3.firstName=>'Third',
owner.3.lastName=>'Owner',
owner.3.street1=>'41 E 300 N',
owner.3.street2=>'',
owner.3.city=>'Spanish Fork',
owner.3.state=>'UT',
owner.3.zipCode=>'84653',
owner.3.phone=>'5555551212',
owner.3.email=>'[email protected]',
owner.3.birthDate=>'19670210',
owner.3.socialSecurity=>'123456789',
owner.3.countryCode=>'US',
owner.3.stakePercentage=>'10',
owner.4.firstName=>'Fourth',
owner.4.lastName=>'Owner',
owner.4.street1=>'41 E 300 N',
owner.4.street2=>'',
owner.4.city=>'Spanish Fork',
owner.4.state=>'UT',
owner.4.zipCode=>'84653',
owner.4.phone=>'5555551212',
owner.4.email=>'[email protected]',
owner.4.birthDate=>'19670210',
owner.4.socialSecurity=>'123456789',
owner.4.countryCode=>'US',
owner.4.stakePercentage=>'10',
business.businessName=>'Start Industries',
business.legalName=>'Start Industries',
business.street1=>'41 E 300 N',
business.street2=>'',
business.city=>'Anywhere',
business.state=>'CT',
business.zipCode=>'06000',
business.timeZoneCode=>'EST',
business.descriptorPhone=>'8604500119',
business.email=>'[email protected]',
business.webSite=>'',
business.taxId=>'147852369',
business.ownershipStructureType=>'C',
business.description=>'Ghostbusting',
estimates.annualCardsVolume=>'111111',
estimates.annualDirectDebitVolume=>'222222',
estimates.avgCardsTransactionAmount=>'2222',
estimates.avgDirectDebitTransactionAmount=>'1111',
estimates.maxTransactionAmount=>'12123',
business.countryCode=>'US',
business.merchantCategoryCode=>'7399',
business.currencyCode=>'USD',
deposit.bankName=>'Stark Bank',
deposit.holderName=>'Tony Stark',
deposit.accountType=>'C',
deposit.routingNumber=>'324377516',
deposit.accountNumber=>'123456789'
],
);
print $req->content;
#More examples this https://docs.python.org/3/howto/urllib2.html
import urllib.parse
import urllib.request
url = 'https://sandbox-portal.zift.io/gates/onboarding?'
values = {
'requestType':'create',
'userName':'{{userName}}',
'password':'{{password}}',
'profileId':'11257624370',
'resellerId':'1',
'portfolioId':'100',
'feeTemplateId':'100028',
'processingConfigurationScript':'zift10',
'merchantType':'M',
'merchantId':'',
'notifyURL':'',
'cancelURL':'',
'returnURL':'',
'returnURLPolicy':'page',
'isEmbedded':'0',
'pageFormat':'',
'officer.firstName':'Tony',
'officer.lastName':'Stark',
'officer.street1':'41 E 300 N',
'officer.street2':'',
'officer.city':'Spanish Fork',
'officer.state':'UT',
'officer.zipCode':'84653',
'officer.phone':'5555551212',
'officer.email':'[email protected]',
'officer.birthDate':'19670210',
'officer.socialSecurity':'123456789',
'officer.countryCode':'US',
'officer.stakePercentage':'10',
'owner.1.firstName':'First',
'owner.1.lastName':'Owner',
'owner.1.street1':'41 E 300 N',
'owner.1.street2':'',
'owner.1.city':'Spanish Fork',
'owner.1.state':'UT',
'owner.1.zipCode':'84653',
'owner.1.phone':'5555551212',
'owner.1.email':'[email protected]',
'owner.1.birthDate':'19670210',
'owner.1.socialSecurity':'123456789',
'owner.1.countryCode':'US',
'owner.1.stakePercentage':'200',
'owner.2.firstName':'Second',
'owner.2.lastName':'Owner',
'owner.2.street1':'41 E 300 N',
'owner.2.street2':'',
'owner.2.city':'Spanish Fork',
'owner.2.state':'UT',
'owner.2.zipCode':'84653',
'owner.2.phone':'5555551212',
'owner.2.email':'[email protected]',
'owner.2.birthDate':'19670210',
'owner.2.socialSecurity':'123456789',
'owner.2.countryCode':'US',
'owner.2.stakePercentage':'10',
'owner.3.firstName':'Third',
'owner.3.lastName':'Owner',
'owner.3.street1':'41 E 300 N',
'owner.3.street2':'',
'owner.3.city':'Spanish Fork',
'owner.3.state':'UT',
'owner.3.zipCode':'84653',
'owner.3.phone':'5555551212',
'owner.3.email':'[email protected]',
'owner.3.birthDate':'19670210',
'owner.3.socialSecurity':'123456789',
'owner.3.countryCode':'US',
'owner.3.stakePercentage':'10',
'owner.4.firstName':'Fourth',
'owner.4.lastName':'Owner',
'owner.4.street1':'41 E 300 N',
'owner.4.street2':'',
'owner.4.city':'Spanish Fork',
'owner.4.state':'UT',
'owner.4.zipCode':'84653',
'owner.4.phone':'5555551212',
'owner.4.email':'[email protected]',
'owner.4.birthDate':'19670210',
'owner.4.socialSecurity':'123456789',
'owner.4.countryCode':'US',
'owner.4.stakePercentage':'10',
'business.businessName':'Start Industries',
'business.legalName':'Start Industries',
'business.street1':'41 E 300 N',
'business.street2':'',
'business.city':'Anywhere',
'business.state':'CT',
'business.zipCode':'06000',
'business.timeZoneCode':'EST',
'business.descriptorPhone':'8604500119',
'business.email':'[email protected]',
'business.webSite':'',
'business.taxId':'147852369',
'business.ownershipStructureType':'C',
'business.description':'Ghostbusting',
'estimates.annualCardsVolume':'111111',
'estimates.annualDirectDebitVolume':'222222',
'estimates.avgCardsTransactionAmount':'2222',
'estimates.avgDirectDebitTransactionAmount':'1111',
'estimates.maxTransactionAmount':'12123',
'business.countryCode':'US',
'business.merchantCategoryCode':'7399',
'business.currencyCode':'USD',
'deposit.bankName':'Stark Bank',
'deposit.holderName':'Tony Stark',
'deposit.accountType':'C',
'deposit.routingNumber':'324377516',
'deposit.accountNumber':'123456789'
}
data = urllib.parse.urlencode(values)
data = data.encode('utf-8') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
print(the_page)