Examples
Authorization request (0100)
// code is compatible with .net8 console app
using System.Web;
using Microsoft.Extensions.DependencyInjection;
var service = new ServiceCollection();
service.AddHttpClient();
var client = service.BuildServiceProvider()
.GetService<IHttpClientFactory>()!
.CreateClient();
var parameters = new Dictionary<string, string>
{
{ "MsgType", "0100" },
{ "MsgSenderID", "[insert your username]" },
{ "MsgSenderAP", "[insert your password]" },
{ "MsgID", "123456" },
{ "MerchantXID", "2995652ABCDEFGH" },
{ "MerchantType", "5999" },
{ "TerminalID", "18101001" },
{ "CardType", "V" },
{ "CardNumber", "4761739001010010" },
{ "CardExpDate", "2512" },
{ "CardVD", "001" },
{ "TransType", "17" },
{ "TransAmount", "25.5" },
{ "TransCurrency", "978" },
{ "TransTime", "230101" },
{ "TransDate", "0310" },
{ "MerchantName", "CIP*Billy shoes" },
{ "MerchantCity", "London" }
};
var request = new HttpRequestMessage(HttpMethod.Post, "https://authorization.acquiring.uat.valitor.com/process")
{
Content = new FormUrlEncodedContent(parameters)
};
HttpResponseMessage response = await client.SendAsync(request);
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
var responseParameters = System.Web.HttpUtility.ParseQueryString(content);
// Process responseParameters here
}
else
{
// Handle error
}
curl -i
--header "Content-Type:application/x-www-form-urlencoded"
--request POST
--data "MsgType=0100&MsgSenderID=[insert your username]&MsgSenderAP=[insert your password]&MsgID=123456&MerchantXID=2995652ABCDEFGH&MerchantType=5999&TerminalID=18101001&CardType=V&CardNumber=4761739001010010&CardVD=001&CardExpDate=2512&TransType=17&TransAmount=25.5&TransCurrency=352&TransTime=230101&TransDate=0310&MerchantName=CIP*Billy shoes&MerchantCity=London"
https://authorization.acquiring.uat.valitor.com/process
Authorization response (0110)
Response http body example: