using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGI_Transaction_SOAP_WS
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btn_AGI_Transaction_ExecuteSocketDelimitedQuery_Click(object sender, EventArgs e)
{
string strParameters_1, strParameters_2;
string strDelimiter = "|";
string response_1, response_2;
//
// PARAMETERS HARDCODED FOR SIMPLICITY - REPLACE 'pg_merchant_id' and 'pg_password' placeholder values
//
//cc sale
strParameters_1 = "pg_merchant_id=xxxxxxxxxxxxx|pg_password=yyyyyyyyyyyyy|pg_transaction_type=10|pg_total_amount=1.00|ecom_billto_postal_name_first=John|ecom_billto_postal_name_last=Smith|ecom_payment_card_type=VISA|ecom_payment_card_name=John Smith|ecom_payment_card_number=4111111111111111|ecom_payment_card_expdate_month=02|ecom_payment_card_expdate_year=2020|endofdata";
//echeck sale
strParameters_2 = "pg_merchant_id=xxxxxxxxxxxxx|pg_password=yyyyyyyyyyyyy|pg_transaction_type=20|pg_total_amount=1.00|ecom_billto_postal_name_first=John|ecom_billto_postal_name_last=Smith|ecom_payment_check_trn=021000021|ecom_payment_check_account=31290321890|ecom_payment_check_account_type=Checking|endofdata";
try
{
AGI_Transaction_SOAP_WS_TEST.PaymentGatewaySoapClient proxy = new AGI_Transaction_SOAP_WS_TEST.PaymentGatewaySoapClient();
response_1 = proxy.ExecuteSocketDelimitedQuery(strParameters_1, strDelimiter);
MessageBox.Show(response_1);
response_2 = proxy.ExecuteSocketDelimitedQuery(strParameters_2, strDelimiter);
MessageBox.Show(response_2);
}
catch (Exception ex)
{
MessageBox.Show(ex.InnerException.ToString());
}
}
private void btn_AGI_Transaction_ExecuteSocketQuery_Click(object sender, EventArgs e)
{
string response_1, response_2;
try
{
AGI_Transaction_SOAP_WS_TEST.PaymentGatewaySoapClient proxy = new AGI_Transaction_SOAP_WS_TEST.PaymentGatewaySoapClient();
//
// PARAMETERS HARDCODED FOR SIMPLICITY - REPLACE 'pg_merchant_id' and 'pg_password' placeholder values
//
//cc sale
response_1 = proxy.ExecuteSocketQuery("xxxxxxxxxxxxx", "yyyyyyyyyyyyy", "10", "", "", "", "", "", "", "", "", "", "1.00", "", "", "", "", "", "", "John", "Smith", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "VISA", "John Smith", "4111111111111111", "04", "2020", "", "", "", "", "", "", "", "", "", "", "", "", "", "");
MessageBox.Show(response_1);
//echeck sale
response_2 = proxy.ExecuteSocketQuery("xxxxxxxxxxxxx", "yyyyyyyyyyyyy", "20", "", "", "", "", "", "", "", "", "", "1.00", "", "", "", "", "", "", "John", "Smith", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "021000021", "312231123", "Checking", "", "", "", "", "", "");
MessageBox.Show(response_2);
}
catch (Exception ex)
{
MessageBox.Show(ex.InnerException.ToString());
}
}
}
}
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article