Example #1
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="authCode">Authcode , mandatory for Voice auth transaction.</param>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object such as  Card Tender.</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     Some transactions cannot be authorized over the Internet (for example, high dollar
 ///     amounts)—processing networks generate Referral (Result Code 13) transactions.
 ///     In these situations, contact the customer service department of the
 ///     merchant bank and provide the payment information as requested.
 ///     If the transaction is approved, the bank provides a voice authorization
 ///     code (AUTHCODE) for the transaction. This must be included as AUTHCODE
 ///     as part of a Voice Authorization transaction.
 /// </remarks>
 /// <example>
 ///     <code lang="C#" escaped="false">
 ///     ...............
 ///     // Populate data objects
 ///     ...............
 ///     // Create a new Voice Auth Transaction.
 ///     VoiceAuthTransaction Trans = new VoiceAuthTransaction("123PNI",
 ///         User, Inv, Card, PayflowUtility.RequestId);
 ///
 ///     // Submit the transaction.
 ///     Response Resp = Trans.SubmitTransaction();
 ///
 ///     if (Resp != null)
 ///     {
 ///         // Get the Transaction Response parameters.
 ///         TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///         if (TrxnResponse != null)
 ///         {
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///             Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///             Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode);
 ///         }
 ///     }
 ///
 ///     // Get the Context and check for any contained SDK specific errors.
 ///     Context Ctx = Resp.TransactionContext;
 ///     if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///     {
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///     }
 ///
 ///  </code>
 ///     <code lang="Visual Basic" escaped="false">
 ///     ...............
 ///     ' Populate data objects
 ///     ...............
 ///      ' Create a new Voice Auth Transaction.
 ///      Dim Trans As VoiceAuthTransaction = New VoiceAuthTransaction("123PNI", User,
 ///         Inv, Card, PayflowUtility.RequestId)
 ///
 ///      ' Submit the transaction.
 ///      Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///      If Not Resp Is Nothing Then
 ///          ' Get the Transaction Response parameters.
 ///          Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///          If Not TrxnResponse Is Nothing Then
 ///              Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///              Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///              Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///              Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode)
 ///          End If
 ///      End If
 ///
 ///      ' Get the Context and check for any contained SDK specific errors.
 ///      Dim Ctx As Context = Resp.TransactionContext
 ///      If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///          Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///      End If
 ///     </code>
 /// </example>
 public VoiceAuthTransaction(string authCode, UserInfo userInfo,
                             Invoice invoice,
                             BaseTender tender, string requestId)
     : this(authCode, userInfo,
            null, invoice,
            tender, requestId)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="AuthCode">Authorization code obtain via another means; i.e. phone.</param>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object such as  Card Tender.</param>
 /// <param name="RequestId">Request Id</param>
 /// <remarks>
 /// Some transactions cannot be authorized over the Internet (for example, high dollar
 /// amounts)—processing networks generate Referral (Result Code 13) transactions.
 /// In these situations, contact the customer service department of the
 /// merchant bank and provide the payment information as requested.
 /// If the transaction is approved, the bank provides a voice authorization
 /// code (AUTHCODE) for the transaction. This must be included as AUTHCODE
 /// as part of a Voice Authorization transaction.
 /// </remarks>
 ///	<example>
 ///	<code lang="C#" escaped="false">
 ///	...............
 ///	// Populate data objects
 ///	...............
 ///
 ///	// Create a new Voice Authorization Transaction.
 ///	VoiceAuthTransaction Trans = new VoiceAuthTransaction("123PNI",
 ///		User, Inv, Card, PayflowUtility.RequestId);
 ///
 ///	// Submit the transaction.
 ///	Response Resp = Trans.SubmitTransaction();
 ///
 ///	if (Resp != null)
 ///	{
 ///		// Get the Transaction Response parameters.
 ///		TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///		if (TrxnResponse != null)
 ///		{
 ///			Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///			Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///			Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///			Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode);
 ///		}
 ///	}
 ///
 ///	// Get the Context and check for any contained SDK specific errors.
 ///	Context Ctx = Resp.TransactionContext;
 ///	if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///	{
 ///		Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///	}
 ///
 ///
 /// </code>
 ///	<code lang="Visual Basic" escaped="false">
 ///	...............
 ///	' Populate data objects
 ///	...............
 ///	 ' Create a new Voice Auth Transaction.
 ///	 Dim Trans As VoiceAuthTransaction = New VoiceAuthTransaction("123PNI", User,
 ///		Inv, Card, PayflowUtility.RequestId)
 ///
 ///	 ' Submit the transaction.
 ///	 Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///	 If Not Resp Is Nothing Then
 ///	     ' Get the Transaction Response parameters.
 ///	     Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///	     If Not TrxnResponse Is Nothing Then
 ///	         Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///	         Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///	         Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///	         Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode)
 ///	     End If
 ///	 End If
 ///
 ///	 ' Get the Context and check for any contained SDK specific errors.
 ///	 Dim Ctx As Context = Resp.TransactionContext
 ///	 If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///	     Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///	 End If
 ///
 ///	</code>
 ///	</example>
 public VoiceAuthTransaction(String AuthCode, UserInfo UserInfo,
                             Invoice Invoice,
                             BaseTender Tender, String RequestId)
     : this(AuthCode, UserInfo,
            null, Invoice,
            Tender, RequestId)
 {
 }
Example #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object </param>
 /// <param name="RequestId">Request Id</param>
 /// <example>This example shows how to create and perform a sale transaction.
 ///<code lang="C#" escaped="false">
 ///		..........
 ///		..........
 ///		//Populate required data objects.
 ///		..........
 ///		..........
 ///
 ///		// Create a new Sale Transaction.
 ///		SaleTransaction Trans = new SaleTransaction(
 ///												UserInfo,
 ///												PayflowConnectionData,
 ///												Invoice,
 ///												Tender,
 ///												RequestId);
 ///		//Submit the transaction.
 ///		Trans.SubmitTransaction();
 ///
 ///		// Get the Response.
 ///		Response Resp = Trans.Response;
 ///		if (Resp != null)
 ///		{
 ///			// Get the Transaction Response parameters.
 ///			TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///			if (TrxnResponse != null)
 ///			{
 ///				Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///				Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///				Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///				Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode);
 ///				Console.WriteLine("AVSADDR = " + TrxnResponse.AVSAddr);
 ///				Console.WriteLine("AVSZIP = " + TrxnResponse.AVSZip);
 ///				Console.WriteLine("IAVS = " + TrxnResponse.IAVS);
 ///			}
 ///			// Get the Fraud Response parameters.
 ///			FraudResponse FraudResp =  Resp.FraudResponse;
 ///			if (FraudResp != null)
 ///			{
 ///				Console.WriteLine("PREFPSMSG = " + FraudResp.PreFpsMsg);
 ///				Console.WriteLine("POSTFPSMSG = " + FraudResp.PostFpsMsg);
 ///			}
 ///		}
 ///		// Get the Context and check for any contained SDK specific errors.
 ///		Context Ctx = Resp.TransactionContext;
 ///		if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///		{
 ///			Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///		}
 ///</code>
 ///<code lang="Visual Basic" escaped="false">
 ///		..........
 ///		..........
 ///		'Populate required data objects.
 ///		..........
 ///		..........
 ///
 /// 'Create a new Sale Transaction.
 ///	Dim Trans as New SaleTransaction(
 ///									UserInfo,
 ///									PayflowConnectionData,
 ///									Invoice,
 ///									Tender,
 ///									RequestId)
 ///		' Submit the transaction.
 ///		Trans.SubmitTransaction()
 ///
 ///		' Get the Response.
 ///		Dim Resp As Response = Trans.Response
 ///
 ///		If Not Resp Is Nothing Then
 ///		' Get the Transaction Response parameters.
 ///
 ///			Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///
 ///			If Not TrxnResponse Is Nothing Then
 ///				Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///				Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///				Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///				Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode)
 ///				Console.WriteLine("AVSADDR = " + TrxnResponse.AVSAddr)
 ///				Console.WriteLine("AVSZIP = " + TrxnResponse.AVSZip)
 ///				Console.WriteLine("IAVS = " + TrxnResponse.IAVS)
 ///			End If
 ///
 ///			' Get the Fraud Response parameters.
 ///			Dim FraudResp As FraudResponse = Resp.FraudResponse
 ///			If Not FraudResp Is Nothing Then
 ///				Console.WriteLine("PREFPSMSG = " + FraudResp.PreFpsMsg)
 ///				Console.WriteLine("POSTFPSMSG = " + FraudResp.PostFpsMsg)
 ///			End If
 ///		End If
 ///
 ///		' Get the Context and check for any contained SDK specific errors.
 ///		Dim Ctx As Context = Resp.TransactionContext
 ///
 ///		If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///			Console.WriteLine(Constants.vbLf + "Errors = " + Ctx.ToString())
 ///		End If
 /// </code>
 /// </example>
 public SaleTransaction(UserInfo UserInfo,
                        Invoice Invoice,
                        BaseTender Tender, String RequestId)
     : this(UserInfo,
            null, Invoice,
            Tender, RequestId)
 {
 }
Example #4
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="authCode">Authcode , mandatory for Voice auth transaction.</param>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="payflowConnectionData">Connection credentials object.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object such as  Card Tender.</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     Some transactions cannot be authorized over the Internet (for example, high dollar
 ///     amounts)—processing networks generate Referral (Result Code 13) transactions.
 ///     In these situations, contact the customer service department of the
 ///     merchant bank and provide the payment information as requested.
 ///     If the transaction is approved, the bank provides a voice authorization
 ///     code (AUTHCODE) for the transaction. This must be included as AUTHCODE
 ///     as part of a Voice Authorization transaction.
 /// </remarks>
 /// <example>
 ///     <code lang="C#" escaped="false">
 ///     ...............
 ///     // Populate data objects
 ///     ...............
 ///     // Create a new Voice Auth Transaction.
 ///     VoiceAuthTransaction Trans = new VoiceAuthTransaction("123PNI",
 ///         User, Connection, Inv, Card, PayflowUtility.RequestId);
 ///
 ///     // Submit the transaction.
 ///     Response Resp = Trans.SubmitTransaction();
 ///
 ///     if (Resp != null)
 ///     {
 ///         // Get the Transaction Response parameters.
 ///         TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///         if (TrxnResponse != null)
 ///         {
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///             Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///             Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode);
 ///         }
 ///     }
 ///
 ///     // Get the Context and check for any contained SDK specific errors.
 ///     Context Ctx = Resp.TransactionContext;
 ///     if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///     {
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///     }
 ///
 ///  </code>
 ///     <code lang="Visual Basic" escaped="false">
 ///     ...............
 ///     ' Populate data objects
 ///     ...............
 ///      ' Create a new Voice Auth Transaction.
 ///      Dim Trans As VoiceAuthTransaction = New VoiceAuthTransaction("123PNI", User,
 ///         Connection, Inv, Card, PayflowUtility.RequestId)
 ///
 ///      ' Submit the transaction.
 ///      Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///      If Not Resp Is Nothing Then
 ///          ' Get the Transaction Response parameters.
 ///          Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///          If Not TrxnResponse Is Nothing Then
 ///              Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///              Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///              Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///              Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode)
 ///          End If
 ///      End If
 ///
 ///      ' Get the Context and check for any contained SDK specific errors.
 ///      Dim Ctx As Context = Resp.TransactionContext
 ///      If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///          Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///      End If
 ///     </code>
 /// </example>
 public VoiceAuthTransaction(string authCode, UserInfo userInfo,
                             PayflowConnectionData payflowConnectionData, Invoice invoice,
                             BaseTender tender, string requestId)
     : base(PayflowConstants.TrxtypeVoiceauth, userInfo,
            payflowConnectionData, invoice,
            tender, requestId)
 {
     _mAuthCode = authCode;
 }
 //constructor to be used in case of basic and order auth
 /// <summary>
 ///
 /// </summary>
 /// <param name="TrxType"></param>
 /// <param name="UserInfo"></param>
 /// <param name="PayflowConnectionData"></param>
 /// <param name="Invoice"></param>
 /// <param name="Tender"></param>
 /// <param name="RequestId"></param>
 internal AuthorizationTransaction(String TrxType, UserInfo UserInfo, PayflowConnectionData PayflowConnectionData,
                                   Invoice Invoice,
                                   BaseTender Tender, String RequestId)
     : base(TrxType, UserInfo, PayflowConnectionData,
            Invoice,
            //PaymentDevice ,
            Tender, RequestId)
 {
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="PayflowConnectionData">Connection credentials object.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object </param>
 /// <param name="RequestId">Request Id</param>
 /// <example>This example shows how to create and perform a authorization transaction.
 /// <code lang="C#" escaped="false">
 ///		..........
 ///		..........
 ///		//Populate required data objects.
 ///		..........
 ///		..........
 ///
 ///		//Create a new Authorization Transaction.
 ///		 AuthorizationTransaction Trans = new AuthorizationTransaction(
 ///												UserInfo,
 ///												PayflowConnectionData,
 ///												Invoice,
 ///												Tender,
 ///												RequestId);
 ///		//Submit the transaction.
 ///		Trans.SubmitTransaction();
 ///
 ///		// Get the Response.
 ///		Response Resp = Trans.Response;
 ///		if (Resp != null)
 ///		{
 ///			// Get the Transaction Response parameters.
 ///			TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///			if (TrxnResponse != null)
 ///			{
 ///				Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///				Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///				Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///				Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode);
 ///				Console.WriteLine("AVSADDR = " + TrxnResponse.AVSAddr);
 ///				Console.WriteLine("AVSZIP = " + TrxnResponse.AVSZip);
 ///				Console.WriteLine("IAVS = " + TrxnResponse.IAVS);
 ///			}
 ///			// Get the Fraud Response parameters.
 ///			FraudResponse FraudResp =  Resp.FraudResponse;
 ///			if (FraudResp != null)
 ///			{
 ///				Console.WriteLine("PREFPSMSG = " + FraudResp.PreFpsMsg);
 ///				Console.WriteLine("POSTFPSMSG = " + FraudResp.PostFpsMsg);
 ///			}
 ///		}
 ///		// Get the Context and check for any contained SDK specific errors.
 ///		Context Ctx = Resp.TransactionContext;
 ///		if (Ctx != null ++ Ctx.getErrorCount() > 0)
 ///		{
 ///			Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///		}
 ///</code>
 ///<code lang="Visual Basic" escaped="false">
 ///		..........
 ///		..........
 ///		'Populate required data objects.
 ///		..........
 ///		..........
 ///
 ///		'Create a new Authorization Transaction.
 ///		Dim Trans as New AuthorizationTransaction(
 ///												UserInfo,
 ///												PayflowConnectionData,
 ///												Invoice,
 ///												Tender,
 ///												RequestId)
 ///		' Submit the transaction.
 ///		Trans.SubmitTransaction()
 ///
 ///		' Get the Response.
 ///		Dim Resp As Response = Trans.Response
 ///
 ///		If Not Resp Is Nothing Then
 ///		' Get the Transaction Response parameters.
 ///
 ///			Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///
 ///			If Not TrxnResponse Is Nothing Then
 ///				Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///				Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///				Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///				Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode)
 ///				Console.WriteLine("AVSADDR = " + TrxnResponse.AVSAddr)
 ///				Console.WriteLine("AVSZIP = " + TrxnResponse.AVSZip)
 ///				Console.WriteLine("IAVS = " + TrxnResponse.IAVS)
 ///			End If
 ///
 ///			' Get the Fraud Response parameters.
 ///			Dim FraudResp As FraudResponse = Resp.FraudResponse
 ///			If Not FraudResp Is Nothing Then
 ///				Console.WriteLine("PREFPSMSG = " + FraudResp.PreFpsMsg)
 ///				Console.WriteLine("POSTFPSMSG = " + FraudResp.PostFpsMsg)
 ///			End If
 ///		End If
 ///
 ///		' Get the Context and check for any contained SDK specific errors.
 ///		Dim Ctx As Context = Resp.TransactionContext
 ///
 ///		If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///			Console.WriteLine(Constants.vbLf + "Errors = " + Ctx.ToString())
 ///		End If
 /// </code>
 /// </example>
 public AuthorizationTransaction(UserInfo UserInfo, PayflowConnectionData PayflowConnectionData,
                                 Invoice Invoice,
                                 BaseTender Tender, String RequestId)
     : base(PayflowConstants.TRXTYPE_AUTH, UserInfo, PayflowConnectionData,
            Invoice,
            //PaymentDevice ,
            Tender, RequestId)
 {
 }
Example #7
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object such as  Card Tender.</param>
 /// <param name="recurringInfo">RecurringInfo object .</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     RecurringAddTransaction is used to add a new recurring profile
 ///     either by submitting the data that defines the profile or by converting an
 ///     existing transaction into a profile. Upon successful creation of a profile,
 ///     PayPal activates the profile, performs the Optional Transaction if specified,
 ///     initiates the payment cycle, and returns a Profile ID (a 12-character string that
 ///     uniquely identifies the profile for searching and reporting). Upon failure, PayPal
 ///     does not generate the profile and returns an error message.
 /// </remarks>
 /// <example>
 ///     <code lang="C#" escaped="false">
 ///     ...............
 ///     // Populate data objects
 ///     ...............
 ///     //Set the Recurring related information.
 ///     RecurringInfo RecurInfo = new RecurringInfo();
 ///     // The date that the first payment will be processed.
 ///     // This will be of the format mmddyyyy.
 ///     RecurInfo.Start = "01012009";
 ///     RecurInfo.ProfileName = "PayPal";
 ///     // Specifies how often the payment occurs. All PAYPERIOD values must use
 ///     // capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///     // QTER / SMYR / YEAR
 ///     RecurInfo.PayPeriod = "WEEK";
 ///     ///////////////////////////////////////////////////////////////////
 ///     // Create a new Recurring Add Transaction.
 ///     RecurringAddTransaction Trans = new RecurringAddTransaction(
 ///         User, Inv, Card, RecurInfo, PayflowUtility.RequestId);
 ///     // Submit the transaction.
 ///     Response Resp = Trans.SubmitTransaction();
 ///     if (Resp != null)
 ///     {
 ///         // Get the Transaction Response parameters.
 ///         TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///         if (TrxnResponse != null)
 ///         {
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///         }
 ///         // Get the Recurring Response parameters.
 ///         RecurringResponse RecurResponse = Resp.RecurringResponse;
 ///         if (RecurResponse != null)
 ///         {
 ///             Console.WriteLine("RPREF = " + RecurResponse.RPRef);
 ///             Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId);
 ///         }
 ///     }
 ///     // Get the Context and check for any contained SDK specific errors.
 ///     Context Ctx = Resp.TransactionContext;
 ///     if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///     {
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///     }
 ///
 ///     </code>
 ///     <code lang="Visual Basic" escaped="false">
 ///     ...............
 ///     ' Populate data objects
 ///     ...............
 ///     'Set the Recurring related information.
 ///     Dim RecurInfo As RecurringInfo = New RecurringInfo
 ///     ' The date that the first payment will be processed.
 ///     ' This will be of the format mmddyyyy.
 ///     RecurInfo.Start = "01012009"
 ///     RecurInfo.ProfileName = "PayPal"
 ///     ' Specifies how often the payment occurs. All PAYPERIOD values must use
 ///     ' capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///     ' QTER / SMYR / YEAR
 ///     RecurInfo.PayPeriod = "WEEK"
 ///     '/////////////////////////////////////////////////////////////////
 ///
 ///     ' Create a new Recurring Add Transaction.
 ///     Dim Trans As RecurringAddTransaction = New RecurringAddTransaction(User, Inv,
 ///                         Card, RecurInfo, PayflowUtility.RequestId)
 ///
 ///     ' Submit the transaction.
 ///     Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///     If Not Resp Is Nothing Then
 ///         ' Get the Transaction Response parameters.
 ///         Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///         If Not TrxnResponse Is Nothing Then
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///         End If
 ///
 ///         ' Get the Recurring Response parameters.
 ///         Dim RecurResponse As RecurringResponse = Resp.RecurringResponse
 ///         If Not RecurResponse Is Nothing Then
 ///             Console.WriteLine("RPREF = " + RecurResponse.RPRef)
 ///             Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId)
 ///         End If
 ///     End If
 ///
 ///     ' Get the Context and check for any contained SDK specific errors.
 ///     Dim Ctx As Context = Resp.TransactionContext
 ///     If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///     End If
 ///
 ///
 ///     </code>
 /// </example>
 public RecurringAddTransaction(
     UserInfo userInfo,
     Invoice invoice,
     BaseTender tender,
     RecurringInfo recurringInfo,
     string requestId)
     : this(userInfo, null, invoice, tender, recurringInfo, requestId)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="TrxType">Transaction Type</param>
 /// <param name="OrigId">Original Transaction Id.</param>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="PayflowConnectionData">Connection credentials object.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object.</param>
 /// <param name="RequestId">Request Id</param>
 /// <remarks>This class can be derived to create a new reference transaction
 /// or can be used as is to submit a new type of reference transaction.
 /// <para>A reference transaction is a transaction which always takes
 ///  the PNRef of a previously submitted transaction.</para>
 /// </remarks>
 public ReferenceTransaction(String TrxType,
                             String OrigId,
                             UserInfo UserInfo,
                             PayflowConnectionData PayflowConnectionData,
                             Invoice Invoice,
                             BaseTender Tender, String RequestId) : base(TrxType, UserInfo, PayflowConnectionData, Invoice, Tender, RequestId)
 {
     mOrigId = OrigId;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object such as  Card Tender.</param>
 /// <param name="RecurringInfo">RecurringInfo object .</param>
 /// <param name="RequestId">Request Id</param>
 /// <remarks> RecurringAddTransaction is used to add a new recurring profile
 /// either by submitting the data that defines the profile or by converting an
 /// existing transaction into a profile. Upon successful creation of a profile,
 /// PayPal activates the profile, performs the Optional Transaction if specified,
 /// initiates the payment cycle, and returns a Profile ID (a 12-character string that
 /// uniquely identifies the profile for searching and reporting). Upon failure, PayPal
 /// does not generate the profile and returns an error message.
 /// </remarks>
 ///	<example>
 ///	<code lang="C#" escaped="false">
 ///	...............
 ///	// Populate data objects
 ///	...............
 ///
 ///	//Set the Recurring related information.
 ///	RecurringInfo RecurInfo = new RecurringInfo();
 ///	// The date that the first payment will be processed.
 ///	// This will be of the format mmddyyyy.
 ///	RecurInfo.Start = "01012009";
 ///	RecurInfo.ProfileName = "PayPal";
 ///	// Specifies how often the payment occurs. All PAYPERIOD values must use
 ///	// capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///	// QTER / SMYR / YEAR
 ///	RecurInfo.PayPeriod = "WEEK";
 ///	///////////////////////////////////////////////////////////////////
 ///
 ///	// Create a new Recurring Add Transaction.
 ///	RecurringAddTransaction Trans = new RecurringAddTransaction(
 ///		User, Inv, Card, RecurInfo, PayflowUtility.RequestId);
 ///
 ///	// Submit the transaction.
 ///	Response Resp = Trans.SubmitTransaction();
 ///
 ///	if (Resp != null)
 ///	{
 ///		// Get the Transaction Response parameters.
 ///		TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///		if (TrxnResponse != null)
 ///		{
 ///			Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///			Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///		}
 ///
 ///		// Get the Recurring Response parameters.
 ///		RecurringResponse RecurResponse = Resp.RecurringResponse;
 ///		if (RecurResponse != null)
 ///		{
 ///			Console.WriteLine("RPREF = " + RecurResponse.RPRef);
 ///			Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId);
 ///		}
 ///	}
 ///
 ///	// Get the Context and check for any contained SDK specific errors.
 ///	Context Ctx = Resp.TransactionContext;
 ///	if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///	{
 ///		Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///	}
 ///
 ///
 ///	</code>
 ///	<code lang="Visual Basic" escaped="false">
 ///	...............
 ///	' Populate data objects
 ///	...............
 ///	'Set the Recurring related information.
 ///	Dim RecurInfo As RecurringInfo = New RecurringInfo
 ///	' The date that the first payment will be processed.
 ///	' This will be of the format mmddyyyy.
 ///	RecurInfo.Start = "01012009"
 ///	RecurInfo.ProfileName = "PayPal"
 ///	' Specifies how often the payment occurs. All PAYPERIOD values must use
 ///	' capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///	' QTER / SMYR / YEAR
 ///	RecurInfo.PayPeriod = "WEEK"
 ///	'/////////////////////////////////////////////////////////////////
 ///
 ///	' Create a new Recurring Add Transaction.
 ///	Dim Trans As RecurringAddTransaction = New RecurringAddTransaction(User, Inv,
 ///						Card, RecurInfo, PayflowUtility.RequestId)
 ///
 ///	' Submit the transaction.
 ///	Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///	If Not Resp Is Nothing Then
 ///	    ' Get the Transaction Response parameters.
 ///	    Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///	    If Not TrxnResponse Is Nothing Then
 ///	        Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///	        Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///	    End If
 ///
 ///	    ' Get the Recurring Response parameters.
 ///	    Dim RecurResponse As RecurringResponse = Resp.RecurringResponse
 ///	    If Not RecurResponse Is Nothing Then
 ///	        Console.WriteLine("RPREF = " + RecurResponse.RPRef)
 ///	        Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId)
 ///	    End If
 ///	End If
 ///
 ///	' Get the Context and check for any contained SDK specific errors.
 ///	Dim Ctx As Context = Resp.TransactionContext
 ///	If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///	    Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///	End If
 ///
 ///
 ///	</code>
 ///	</example>
 public RecurringAddTransaction(
     UserInfo UserInfo,
     Invoice Invoice,
     BaseTender Tender,
     RecurringInfo RecurringInfo,
     String RequestId)
     : this(UserInfo, null, Invoice, Tender, RecurringInfo, RequestId)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="AuthCode">Authorization code obtain via another means; i.e. phone.</param>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="PayflowConnectionData">Connection credentials object.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object such as  Card Tender.</param>
 /// <param name="RequestId">Request Id</param>
 /// <remarks>
 /// Some transactions cannot be authorized over the Internet (for example, high dollar
 /// amounts)—processing networks generate Referral (Result Code 13) transactions.
 /// In these situations, contact the customer service department of the
 /// merchant bank and provide the payment information as requested.
 /// If the transaction is approved, the bank provides a voice authorization
 /// code (AUTHCODE) for the transaction. This must be included as AUTHCODE
 /// as part of a Voice Authorization transaction.
 /// </remarks>
 ///	<example>
 ///	<code lang="C#" escaped="false">
 ///	...............
 ///	// Populate data objects
 ///	...............
 ///
 ///	// Create a new Voice Authorization Transaction.
 ///	VoiceAuthTransaction Trans = new VoiceAuthTransaction("123PNI",
 ///		User, Connection, Inv, Card, PayflowUtility.RequestId);
 ///
 ///	// Submit the transaction.
 ///	Response Resp = Trans.SubmitTransaction();
 ///
 ///	if (Resp != null)
 ///	{
 ///		// Get the Transaction Response parameters.
 ///		TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///		if (TrxnResponse != null)
 ///		{
 ///			Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///			Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///			Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///			Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode);
 ///		}
 ///	}
 ///
 ///	// Get the Context and check for any contained SDK specific errors.
 ///	Context Ctx = Resp.TransactionContext;
 ///	if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///	{
 ///		Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///	}
 ///
 ///
 /// </code>
 ///	<code lang="Visual Basic" escaped="false">
 ///	...............
 ///	' Populate data objects
 ///	...............
 ///	 ' Create a new Voice Authorization Transaction.
 ///	 Dim Trans As VoiceAuthTransaction = New VoiceAuthTransaction("123PNI", User,
 ///		Connection, Inv, Card, PayflowUtility.RequestId)
 ///
 ///	 ' Submit the transaction.
 ///	 Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///	 If Not Resp Is Nothing Then
 ///	     ' Get the Transaction Response parameters.
 ///	     Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///	     If Not TrxnResponse Is Nothing Then
 ///	         Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///	         Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///	         Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///	         Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode)
 ///	     End If
 ///	 End If
 ///
 ///	 ' Get the Context and check for any contained SDK specific errors.
 ///	 Dim Ctx As Context = Resp.TransactionContext
 ///	 If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///	     Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///	 End If
 ///
 ///	</code>
 ///	</example>
 public VoiceAuthTransaction(String AuthCode, UserInfo UserInfo,
                             PayflowConnectionData PayflowConnectionData, Invoice Invoice,
                             BaseTender Tender, String RequestId)
     : base(PayflowConstants.TRXTYPE_VOICEAUTH, UserInfo,
            PayflowConnectionData, Invoice,
            Tender, RequestId)
 {
     mAuthCode = AuthCode;
 }
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="trxType">Transaction Type</param>
 /// <param name="origId">Original Transaction Id.</param>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="payflowConnectionData">Connection credentials object.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object.</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     This class can be derived to create a new reference transaction
 ///     or can be used as is to submit a new type of reference transaction.
 ///     <para>
 ///         A reference transaction is a transaction which always takes
 ///         the PNRef of a previously submitted transaction.
 ///     </para>
 /// </remarks>
 public ReferenceTransaction(string trxType,
                             string origId,
                             UserInfo userInfo,
                             PayflowConnectionData payflowConnectionData,
                             Invoice invoice,
                             BaseTender tender, string requestId) : base(trxType, userInfo, payflowConnectionData, invoice, tender,
                                                                         requestId)
 {
     _mOrigId = origId;
 }
Example #12
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="PayflowConnectionData">Connection credentials object.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object </param>
 /// <param name="RequestId">Request Id</param>
 /// <example>This example shows how to create and perform a sale transaction.
 /// <code lang="C#" escaped="false">
 ///		..........
 ///		..........
 ///		//Populate required data objects.
 ///		..........
 ///		..........
 ///
 ///     //Create a new Sale Transaction
 ///     SaleTransaction Trans = new SaleTransaction(
 ///													UserInfo,
 ///													PayflowConnectionData,
 ///													Invoice,
 ///													Tender,
 ///													RequestId);
 ///		//Submit the transaction.
 ///		Trans.SubmitTransaction();
 ///
 ///		// Get the Response.
 ///		Response Resp = Trans.Response;
 ///		if (Resp != null)
 ///		{
 ///			// Get the Transaction Response parameters.
 ///			TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///			if (TrxnResponse != null)
 ///			{
 ///				Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///				Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///				Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///				Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode);
 ///				Console.WriteLine("AVSADDR = " + TrxnResponse.AVSAddr);
 ///				Console.WriteLine("AVSZIP = " + TrxnResponse.AVSZip);
 ///				Console.WriteLine("IAVS = " + TrxnResponse.IAVS);
 ///			}
 ///			// Get the Fraud Response parameters.
 ///			FraudResponse FraudResp =  Resp.FraudResponse;
 ///			if (FraudResp != null)
 ///			{
 ///				Console.WriteLine("PREFPSMSG = " + FraudResp.PreFpsMsg);
 ///				Console.WriteLine("POSTFPSMSG = " + FraudResp.PostFpsMsg);
 ///			}
 ///		}
 ///		// Get the Context and check for any contained SDK specific errors.
 ///		Context Ctx = Resp.TransactionContext;
 ///		if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///		{
 ///			Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///		}
 ///</code>
 ///<code lang="Visual Basic" escaped="false">
 ///		..........
 ///		..........
 ///		'Populate required data objects.
 ///		..........
 ///		..........
 ///
 ///		'Create a new Sale Transaction
 ///		Dim Trans as New SaleTransaction(
 ///										UserInfo,
 ///										PayflowConnectionData,
 ///										Invoice,
 ///										Tender,
 ///										RequestId)
 ///		' Submit the transaction.
 ///		Trans.SubmitTransaction()
 ///
 ///		' Get the Response.
 ///		Dim Resp As Response = Trans.Response
 ///
 ///		If Not Resp Is Nothing Then
 ///		' Get the Transaction Response parameters.
 ///
 ///			Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///
 ///			If Not TrxnResponse Is Nothing Then
 ///				Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///				Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///				Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///				Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode)
 ///				Console.WriteLine("AVSADDR = " + TrxnResponse.AVSAddr)
 ///				Console.WriteLine("AVSZIP = " + TrxnResponse.AVSZip)
 ///				Console.WriteLine("IAVS = " + TrxnResponse.IAVS)
 ///			End If
 ///
 ///			' Get the Fraud Response parameters.
 ///			Dim FraudResp As FraudResponse = Resp.FraudResponse
 ///			If Not FraudResp Is Nothing Then
 ///				Console.WriteLine("PREFPSMSG = " + FraudResp.PreFpsMsg)
 ///				Console.WriteLine("POSTFPSMSG = " + FraudResp.PostFpsMsg)
 ///			End If
 ///		End If
 ///
 ///		' Get the Context and check for any contained SDK specific errors.
 ///		Dim Ctx As Context = Resp.TransactionContext
 ///
 ///		If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///			Console.WriteLine(Constants.vbLf + "Errors = " + Ctx.ToString())
 ///		End If
 /// </code>
 /// </example>
 public SaleTransaction(UserInfo UserInfo,
                        PayflowConnectionData PayflowConnectionData, Invoice Invoice,
                        //PaymentDevice PaymentDevice ,
                        BaseTender Tender, String RequestId)
     : base(PayflowConstants.TRXTYPE_SALE, UserInfo,
            PayflowConnectionData, Invoice,
            //PaymentDevice ,
            Tender, RequestId)
 {
 }
Example #13
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="TrxType">Transaction type.</param>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="PayflowConnectionData">Connection credentials object.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object such as  Card Tender.</param>
 /// <param name="RequestId">Request Id</param>
 public BaseTransaction(String TrxType, UserInfo UserInfo,
                        PayflowConnectionData PayflowConnectionData, Invoice Invoice,
                        BaseTender Tender, String RequestId) : this(TrxType, UserInfo, PayflowConnectionData, Invoice, RequestId)
 {
     mTender = Tender;
     if (mTender != null)
     {
         mTender.Context       = mContext;
         mTender.RequestBuffer = mRequestBuffer;
     }
 }
Example #14
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="action">Action, type of recurring transaction</param>
 /// <param name="recurringInfo">Recurring Info object.</param>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     Each derived class of RecurringTransaction specifies a unique action
 ///     transaction. This class can also be directly used to perform a recurring
 ///     transaction. Alternatively, a new class can be extended from this to
 ///     create a specific recurring action transaction.
 /// </remarks>
 /// <example>
 ///     <code lang="C#" escaped="false">
 ///     ...............
 ///     // Populate data objects
 ///     ...............
 ///     //Set the Recurring related information.
 ///     RecurringInfo RecurInfo = new RecurringInfo();
 ///     // The date that the first payment will be processed.
 ///     // This will be of the format mmddyyyy.
 ///     RecurInfo.Start = "01012009";
 ///     RecurInfo.ProfileName = "PayPal";
 ///     // Specifies how often the payment occurs. All PAYPERIOD values must use
 ///     // capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///     // QTER / SMYR / YEAR
 ///     RecurInfo.PayPeriod = "WEEK";
 ///     ///////////////////////////////////////////////////////////////////
 ///     // Create a new Recurring Transaction.
 ///     RecurringTransaction Trans = new RecurringTransaction("A", RecurInfo,
 ///         User, Inv, Tender, PayflowUtility.RequestId);
 ///     // Submit the transaction.
 ///     Response Resp = Trans.SubmitTransaction();
 ///     if (Resp != null)
 ///     {
 ///         // Get the Transaction Response parameters.
 ///         TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///         if (TrxnResponse != null)
 ///         {
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///         }
 ///         // Get the Recurring Response parameters.
 ///         RecurringResponse RecurResponse = Resp.RecurringResponse;
 ///         if (RecurResponse != null)
 ///         {
 ///             Console.WriteLine("RPREF = " + RecurResponse.RPRef);
 ///             Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId);
 ///         }
 ///     }
 ///     // Get the Context and check for any contained SDK specific errors.
 ///     Context Ctx = Resp.TransactionContext;
 ///     if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///     {
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///     }
 ///
 ///  </code>
 ///     <code lang="Visual Basic" escaped="false">
 ///     ...............
 ///     ' Populate data objects
 ///     ...............
 ///     'Set the Recurring related information.
 ///       Dim RecurInfo As RecurringInfo = New RecurringInfo
 ///       ' The date that the first payment will be processed.
 ///       ' This will be of the format mmddyyyy.
 ///       RecurInfo.Start = "01012009"
 ///       RecurInfo.ProfileName = "PayPal"
 ///       ' Specifies how often the payment occurs. All PAYPERIOD values must use
 ///       ' capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///       ' QTER / SMYR / YEAR
 ///       RecurInfo.PayPeriod = "WEEK"
 ///       '/////////////////////////////////////////////////////////////////
 ///       ' Create a new Recurring Transaction.
 ///       Dim Trans As RecurringTransaction = New RecurringTransaction("A", RecurInfo,
 ///         User, Inv, Tender, PayflowUtility.RequestId)
 ///       ' Submit the transaction.
 ///       Dim Resp As Response = Trans.SubmitTransaction()
 ///       If Not Resp Is Nothing Then
 ///           ' Get the Transaction Response parameters.
 ///           Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///           If Not TrxnResponse Is Nothing Then
 ///               Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///               Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///           End If
 ///           ' Get the Recurring Response parameters.
 ///           Dim RecurResponse As RecurringResponse = Resp.RecurringResponse
 ///           If Not RecurResponse Is Nothing Then
 ///               Console.WriteLine("RPREF = " + RecurResponse.RPRef)
 ///               Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId)
 ///           End If
 ///       End If
 ///       ' Get the Context and check for any contained SDK specific errors.
 ///       Dim Ctx As Context = Resp.TransactionContext
 ///       If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///       End If
 ///
 ///     </code>
 /// </example>
 public RecurringTransaction(
     string action,
     RecurringInfo recurringInfo,
     UserInfo userInfo,
     Invoice invoice,
     BaseTender tender, string requestId)
     : this(action, recurringInfo,
            userInfo, null, invoice,
            tender, requestId)
 {
 }
 /// <summary>
 ///     Constructor.
 /// </summary>
 /// <param name="trxType">Transaction type.</param>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="payflowConnectionData">Connection credentials object.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object such as  Card Tender.</param>
 /// <param name="requestId">Request Id</param>
 public BaseTransaction(string trxType, UserInfo userInfo,
                        PayflowConnectionData payflowConnectionData, Invoice invoice,
                        BaseTender tender, string requestId) : this(trxType, userInfo, payflowConnectionData, invoice, requestId)
 {
     Tender = tender;
     if (Tender != null)
     {
         Tender.Context       = Context;
         Tender.RequestBuffer = _mRequestBuffer;
     }
 }
Example #16
0
 /// <summary>
 ///     Constructor.
 /// </summary>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object such as  Card Tender.</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     This class is used for a stand alone credit transaction.
 /// </remarks>
 /// <example>
 ///     <code lang="C#" escaped="false">
 ///     ...............
 ///     // Populate data objects
 ///     ...............
 ///     // Create a new Credit Transaction.
 ///     // Following is an example of a stand alone type of transaction.
 ///     CreditTransaction Trans = new CreditTransaction(User, Inv,
 ///                             Tender, PayflowUtility.RequestId);
 ///     // Submit the transaction.
 ///     Response Resp = Trans.SubmitTransaction();
 ///     if (Resp != null)
 ///     {
 ///         // Get the Transaction Response parameters.
 ///         TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///         if (TrxnResponse != null)
 ///         {
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///             Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///         }
 ///     }
 ///     // Get the Context and check for any contained SDK specific errors.
 ///     Context Ctx = Resp.TransactionContext;
 ///     if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///     {
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///     }
 ///
 ///     </code>
 ///     <code lang="Visual Basic" escaped="false">
 ///     ...............
 ///     ' Populate data objects
 ///     ...............
 ///     ' Create a new Credit Transaction.
 ///     ' Following is an example of a stand alone credit type of transaction.
 ///     Dim Trans As CreditTransaction = New CreditTransaction(User,
 ///                          Inv, Tender, PayflowUtility.RequestId)
 ///         ' Submit the transaction.
 ///     Dim Resp As Response = Trans.SubmitTransaction()
 ///     If Not Resp Is Nothing Then
 ///         ' Get the Transaction Response parameters.
 ///         Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///         If Not TrxnResponse Is Nothing Then
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///             Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///         End If
 ///     End If
 ///     ' Get the Context and check for any contained SDK specific errors.
 ///     Dim Ctx As Context = Resp.TransactionContext
 ///     If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///     End If
 ///     </code>
 /// </example>
 public CreditTransaction(UserInfo userInfo,
                          Invoice invoice,
                          BaseTender tender,
                          string requestId)
     : this(userInfo,
            null,
            invoice,
            tender,
            requestId)
 {
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="PayflowConnectionData">Connection credentials object.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object such as  Card Tender.</param>
 /// <param name="RequestId">Request Id</param>
 ///	<remarks>This class is used for a stand alone credit transaction.
 ///	</remarks>
 ///	<example>
 ///	<code lang="C#" escaped="false">
 ///	...............
 ///	// Populate data objects
 ///	...............
 ///
 ///	// Create a new Credit Transaction.
 ///	// Following is an example of a stand alone credit type of transaction.
 ///	CreditTransaction Trans = new CreditTransaction(User, Inv, Connection,
 ///							Tender, PayflowUtility.RequestId);
 ///
 ///	// Submit the transaction.
 ///	Response Resp = Trans.SubmitTransaction();
 ///
 ///	if (Resp != null)
 ///	{
 ///		// Get the Transaction Response parameters.
 ///		TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///		if (TrxnResponse != null)
 ///		{
 ///			Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///			Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///			Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///		}
 ///	}
 ///
 ///	// Get the Context and check for any contained SDK specific errors.
 ///	Context Ctx = Resp.TransactionContext;
 ///	if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///	{
 ///		Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///	}
 ///
 ///
 ///	</code>
 ///	<code lang="Visual Basic" escaped="false">
 ///	...............
 ///	' Populate data objects
 ///	...............
 ///	' Create a new Credit Transaction.
 ///	' Following is an example of a stand alone credit type of transaction.
 ///	Dim Trans As CreditTransaction = New CreditTransaction(User, Connection,
 ///						 Inv, Tender, PayflowUtility.RequestId)
 ///		' Submit the transaction.
 ///	Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///	If Not Resp Is Nothing Then
 ///	    ' Get the Transaction Response parameters.
 ///	    Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///	    If Not TrxnResponse Is Nothing Then
 ///	        Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///	        Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///	        Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///	    End If
 ///	End If
 ///
 ///	' Get the Context and check for any contained SDK specific errors.
 ///	Dim Ctx As Context = Resp.TransactionContext
 ///	If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///	    Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///	End If
 ///
 ///	</code>
 ///	</example>
 public CreditTransaction(UserInfo UserInfo,
                          PayflowConnectionData PayflowConnectionData,
                          Invoice Invoice,
                          BaseTender Tender,
                          String RequestId)
     : base(PayflowConstants.TRXTYPE_CREDIT, UserInfo,
            PayflowConnectionData,
            Invoice,
            Tender,
            RequestId)
 {
 }
Example #18
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="payflowConnectionData">Connection credentials object.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object such as  Card Tender.</param>
 /// <param name="recurringInfo">RecurringInfo object .</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     RecurringAddTransaction is used to add a new recurring profile
 ///     either by submitting the data that defines the profile or by converting an
 ///     existing transaction into a profile. Upon successful creation of a profile,
 ///     PayPal activates the profile, performs the Optional Transaction if specified,
 ///     initiates the payment cycle, and returns a Profile ID (a 12-character string that
 ///     uniquely identifies the profile for searching and reporting). Upon failure, PayPal
 ///     does not generate the profile and returns an error message.
 /// </remarks>
 /// <example>
 ///     <code lang="C#" escaped="false">
 ///     ...............
 ///     // Populate data objects
 ///     ...............
 ///     //Set the Recurring related information.
 ///     RecurringInfo RecurInfo = new RecurringInfo();
 ///     // The date that the first payment will be processed.
 ///     // This will be of the format mmddyyyy.
 ///     RecurInfo.Start = "01012009";
 ///     RecurInfo.ProfileName = "PayPal";
 ///     // Specifies how often the payment occurs. All PAYPERIOD values must use
 ///     // capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///     // QTER / SMYR / YEAR
 ///     RecurInfo.PayPeriod = "WEEK";
 ///     ///////////////////////////////////////////////////////////////////
 ///     // Create a new Recurring Add Transaction.
 ///     RecurringAddTransaction Trans = new RecurringAddTransaction(
 ///         User, Connection, Inv, Card, RecurInfo, PayflowUtility.RequestId);
 ///     // Submit the transaction.
 ///     Response Resp = Trans.SubmitTransaction();
 ///     if (Resp != null)
 ///     {
 ///         // Get the Transaction Response parameters.
 ///         TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///         if (TrxnResponse != null)
 ///         {
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///         }
 ///         // Get the Recurring Response parameters.
 ///         RecurringResponse RecurResponse = Resp.RecurringResponse;
 ///         if (RecurResponse != null)
 ///         {
 ///             Console.WriteLine("RPREF = " + RecurResponse.RPRef);
 ///             Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId);
 ///         }
 ///     }
 ///     // Get the Context and check for any contained SDK specific errors.
 ///     Context Ctx = Resp.TransactionContext;
 ///     if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///     {
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///     }
 ///
 ///     </code>
 ///     <code lang="Visual Basic" escaped="false">
 ///     ...............
 ///     ' Populate data objects
 ///     ...............
 ///     'Set the Recurring related information.
 ///     Dim RecurInfo As RecurringInfo = New RecurringInfo
 ///     ' The date that the first payment will be processed.
 ///     ' This will be of the format mmddyyyy.
 ///     RecurInfo.Start = "01012009"
 ///     RecurInfo.ProfileName = "PayPal"
 ///     ' Specifies how often the payment occurs. All PAYPERIOD values must use
 ///     ' capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///     ' QTER / SMYR / YEAR
 ///     RecurInfo.PayPeriod = "WEEK"
 ///     '/////////////////////////////////////////////////////////////////
 ///
 ///     ' Create a new Recurring Add Transaction.
 ///     Dim Trans As RecurringAddTransaction = New RecurringAddTransaction(User, Connection, Inv,
 ///                         Card, RecurInfo, PayflowUtility.RequestId)
 ///
 ///     ' Submit the transaction.
 ///     Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///     If Not Resp Is Nothing Then
 ///         ' Get the Transaction Response parameters.
 ///         Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///         If Not TrxnResponse Is Nothing Then
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///         End If
 ///
 ///         ' Get the Recurring Response parameters.
 ///         Dim RecurResponse As RecurringResponse = Resp.RecurringResponse
 ///         If Not RecurResponse Is Nothing Then
 ///             Console.WriteLine("RPREF = " + RecurResponse.RPRef)
 ///             Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId)
 ///         End If
 ///     End If
 ///
 ///     ' Get the Context and check for any contained SDK specific errors.
 ///     Dim Ctx As Context = Resp.TransactionContext
 ///     If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///     End If
 ///
 ///
 ///     </code>
 /// </example>
 public RecurringAddTransaction(
     UserInfo userInfo,
     PayflowConnectionData payflowConnectionData,
     Invoice invoice,
     BaseTender tender,
     RecurringInfo recurringInfo,
     string requestId)
     : base(PayflowConstants.RecurringActionAdd,
            recurringInfo,
            userInfo, payflowConnectionData, invoice, tender, requestId)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="PayflowConnectionData">Connection credentials object.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object such as  Card Tender.</param>
 /// <param name="RecurringInfo">RecurringInfo object .</param>
 /// <param name="RequestId">Request Id</param>
 /// <remarks> RecurringAddTransaction is used to add a new recurring profile
 /// either by submitting the data that defines the profile or by converting an
 /// existing transaction into a profile. Upon successful creation of a profile,
 /// PayPal activates the profile, performs the Optional Transaction if specified,
 /// initiates the payment cycle, and returns a Profile ID (a 12-character string that
 /// uniquely identifies the profile for searching and reporting). Upon failure, PayPal
 /// does not generate the profile and returns an error message.
 /// </remarks>
 ///	<example>
 ///	<code lang="C#" escaped="false">
 ///	...............
 ///	// Populate data objects
 ///	...............
 ///
 ///	//Set the Recurring related information.
 ///	RecurringInfo RecurInfo = new RecurringInfo();
 ///	// The date that the first payment will be processed.
 ///	// This will be of the format mmddyyyy.
 ///	RecurInfo.Start = "01012009";
 ///	RecurInfo.ProfileName = "PayPal";
 ///	// Specifies how often the payment occurs. All PAYPERIOD values must use
 ///	// capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///	// QTER / SMYR / YEAR
 ///	RecurInfo.PayPeriod = "WEEK";
 ///	///////////////////////////////////////////////////////////////////
 ///
 ///	// Create a new Recurring Add Transaction.
 ///	RecurringAddTransaction Trans = new RecurringAddTransaction(
 ///		User, Connection, Inv, Card, RecurInfo, PayflowUtility.RequestId);
 ///
 ///	// Submit the transaction.
 ///	Response Resp = Trans.SubmitTransaction();
 ///
 ///	if (Resp != null)
 ///	{
 ///		// Get the Transaction Response parameters.
 ///		TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///		if (TrxnResponse != null)
 ///		{
 ///			Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///			Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///		}
 ///
 ///		// Get the Recurring Response parameters.
 ///		RecurringResponse RecurResponse = Resp.RecurringResponse;
 ///		if (RecurResponse != null)
 ///		{
 ///			Console.WriteLine("RPREF = " + RecurResponse.RPRef);
 ///			Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId);
 ///		}
 ///	}
 ///
 ///	// Get the Context and check for any contained SDK specific errors.
 ///	Context Ctx = Resp.TransactionContext;
 ///	if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///	{
 ///		Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///	}
 ///
 ///
 ///	</code>
 ///	<code lang="Visual Basic" escaped="false">
 ///	...............
 ///	' Populate data objects
 ///	...............
 ///	'Set the Recurring related information.
 ///	Dim RecurInfo As RecurringInfo = New RecurringInfo
 ///	' The date that the first payment will be processed.
 ///	' This will be of the format mmddyyyy.
 ///	RecurInfo.Start = "01012009"
 ///	RecurInfo.ProfileName = "PayPal"
 ///	' Specifies how often the payment occurs. All PAYPERIOD values must use
 ///	' capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///	' QTER / SMYR / YEAR
 ///	RecurInfo.PayPeriod = "WEEK"
 ///	'/////////////////////////////////////////////////////////////////
 ///
 ///	' Create a new Recurring Add Transaction.
 ///	Dim Trans As RecurringAddTransaction = New RecurringAddTransaction(User, Connection, Inv,
 ///						Card, RecurInfo, PayflowUtility.RequestId)
 ///
 ///	' Submit the transaction.
 ///	Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///	If Not Resp Is Nothing Then
 ///	    ' Get the Transaction Response parameters.
 ///	    Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///	    If Not TrxnResponse Is Nothing Then
 ///	        Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///	        Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///	    End If
 ///
 ///	    ' Get the Recurring Response parameters.
 ///	    Dim RecurResponse As RecurringResponse = Resp.RecurringResponse
 ///	    If Not RecurResponse Is Nothing Then
 ///	        Console.WriteLine("RPREF = " + RecurResponse.RPRef)
 ///	        Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId)
 ///	    End If
 ///	End If
 ///
 ///	' Get the Context and check for any contained SDK specific errors.
 ///	Dim Ctx As Context = Resp.TransactionContext
 ///	If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///	    Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///	End If
 ///
 ///
 ///	</code>
 ///	</example>
 public RecurringAddTransaction(
     UserInfo UserInfo,
     PayflowConnectionData PayflowConnectionData,
     Invoice Invoice,
     BaseTender Tender,
     RecurringInfo RecurringInfo,
     String RequestId)
     : base(PayflowConstants.RECURRING_ACTION_ADD,
            RecurringInfo,
            UserInfo, PayflowConnectionData, Invoice, Tender, RequestId)
 {
 }
Example #20
0
 /// <summary>
 ///     Constructor.
 /// </summary>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="payflowConnectionData">Connection credentials object.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object such as  Card Tender.</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     This class is used for a stand alone credit transaction.
 /// </remarks>
 /// <example>
 ///     <code lang="C#" escaped="false">
 ///     ...............
 ///     // Populate data objects
 ///     ...............
 ///     // Create a new Credit Transaction.
 ///     // Following is an example of a stand alone credit type of transaction.
 ///     CreditTransaction Trans = new CreditTransaction(User, Inv, Connection,
 ///                             Tender, PayflowUtility.RequestId);
 ///     // Submit the transaction.
 ///     Response Resp = Trans.SubmitTransaction();
 ///     if (Resp != null)
 ///     {
 ///         // Get the Transaction Response parameters.
 ///         TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///         if (TrxnResponse != null)
 ///         {
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///             Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///         }
 ///     }
 ///     // Get the Context and check for any contained SDK specific errors.
 ///     Context Ctx = Resp.TransactionContext;
 ///     if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///     {
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///     }
 ///
 ///     </code>
 ///     <code lang="Visual Basic" escaped="false">
 ///     ...............
 ///     ' Populate data objects
 ///     ...............
 ///     ' Create a new Credit Transaction.
 ///     ' Following is an example of a stand alone credit type of transaction.
 ///     Dim Trans As CreditTransaction = New CreditTransaction(User, Connection,
 ///                          Inv, Tender, PayflowUtility.RequestId)
 ///         ' Submit the transaction.
 ///     Dim Resp As Response = Trans.SubmitTransaction()
 ///     If Not Resp Is Nothing Then
 ///         ' Get the Transaction Response parameters.
 ///         Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///         If Not TrxnResponse Is Nothing Then
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///             Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///         End If
 ///     End If
 ///     ' Get the Context and check for any contained SDK specific errors.
 ///     Dim Ctx As Context = Resp.TransactionContext
 ///     If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///     End If
 ///     </code>
 /// </example>
 public CreditTransaction(UserInfo userInfo,
                          PayflowConnectionData payflowConnectionData,
                          Invoice invoice,
                          BaseTender tender,
                          string requestId)
     : base(PayflowConstants.TrxtypeCredit, userInfo,
            payflowConnectionData,
            invoice,
            tender,
            requestId)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="Action" >Action, type of recurring transaction</param>
 /// <param name="RecurringInfo">Recurring Info object.</param>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="PayflowConnectionData">Connection credentials object.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender" >Tender</param>
 /// <param name="RequestId">Request Id</param>
 /// <remarks>
 /// Each derived class of RecurringTransaction specifies a unique action
 /// transaction. This class can also be directly used to perform a recurring
 /// transaction. Alternatively, a new class can be extended from this to
 /// create a specific recurring action transaction.
 /// </remarks>
 ///	<example>
 ///	<code lang="C#" escaped="false">
 ///	...............
 ///	// Populate data objects
 ///	...............
 ///
 ///	//Set the Recurring related information.
 ///	RecurringInfo RecurInfo = new RecurringInfo();
 ///	// The date that the first payment will be processed.
 ///	// This will be of the format mmddyyyy.
 ///	RecurInfo.Start = "01012009";
 ///	RecurInfo.ProfileName = "PayPal";
 ///	// Specifies how often the payment occurs. All PAYPERIOD values must use
 ///	// capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///	// QTER / SMYR / YEAR
 ///	RecurInfo.PayPeriod = "WEEK";
 ///	///////////////////////////////////////////////////////////////////
 ///
 ///	// Create a new Recurring Transaction.
 ///	RecurringTransaction Trans = new RecurringTransaction("A", RecurInfo,
 ///		User, Connection, Inv, Tender, PayflowUtility.RequestId);
 ///
 ///	// Submit the transaction.
 ///	Response Resp = Trans.SubmitTransaction();
 ///
 ///	if (Resp != null)
 ///	{
 ///		// Get the Transaction Response parameters.
 ///		TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///		if (TrxnResponse != null)
 ///		{
 ///			Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///			Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///		}
 ///
 ///		// Get the Recurring Response parameters.
 ///		RecurringResponse RecurResponse = Resp.RecurringResponse;
 ///		if (RecurResponse != null)
 ///		{
 ///			Console.WriteLine("RPREF = " + RecurResponse.RPRef);
 ///			Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId);
 ///		}
 ///	}
 ///
 ///	// Get the Context and check for any contained SDK specific errors.
 ///	Context Ctx = Resp.TransactionContext;
 ///	if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///	{
 ///		Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///	}
 ///
 ///
 ///
 /// </code>
 ///	<code lang="Visual Basic" escaped="false">
 ///	...............
 ///	' Populate data objects
 ///	...............
 ///	'Set the Recurring related information.
 ///	  Dim RecurInfo As RecurringInfo = New RecurringInfo
 ///	  ' The date that the first payment will be processed.
 ///	  ' This will be of the format mmddyyyy.
 ///	  RecurInfo.Start = "01012009"
 ///	  RecurInfo.ProfileName = "PayPal"
 ///	  ' Specifies how often the payment occurs. All PAYPERIOD values must use
 ///	  ' capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
 ///	  ' QTER / SMYR / YEAR
 ///	  RecurInfo.PayPeriod = "WEEK"
 ///	  '/////////////////////////////////////////////////////////////////
 ///
 ///	  ' Create a new Recurring Transaction.
 ///	  Dim Trans As RecurringTransaction = New RecurringTransaction("A", RecurInfo,
 ///	    User, Connection, Inv, Tender, PayflowUtility.RequestId)
 ///
 ///	  ' Submit the transaction.
 ///	  Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///	  If Not Resp Is Nothing Then
 ///	      ' Get the Transaction Response parameters.
 ///	      Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///	      If Not TrxnResponse Is Nothing Then
 ///	          Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///	          Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///	      End If
 ///
 ///	      ' Get the Recurring Response parameters.
 ///	      Dim RecurResponse As RecurringResponse = Resp.RecurringResponse
 ///	      If Not RecurResponse Is Nothing Then
 ///	          Console.WriteLine("RPREF = " + RecurResponse.RPRef)
 ///	          Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId)
 ///	      End If
 ///	  End If
 ///
 ///	  ' Get the Context and check for any contained SDK specific errors.
 ///	  Dim Ctx As Context = Resp.TransactionContext
 ///	  If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///		Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///	  End If
 ///
 ///
 ///	</code>
 ///	</example>
 public RecurringTransaction(
     String Action,
     RecurringInfo RecurringInfo,
     UserInfo UserInfo,
     PayflowConnectionData PayflowConnectionData,
     Invoice Invoice,
     BaseTender Tender, String RequestId)
     : base(PayflowConstants.TRXTYPE_RECURRING,
            UserInfo, PayflowConnectionData, Invoice,
            Tender, RequestId)
 {
     if (RecurringInfo != null)
     {
         mRecurringInfo         = RecurringInfo;
         mRecurringInfo.Context = base.Context;
     }
     mAction = Action;
 }
Example #22
0
        /// <summary>
        ///     Constructor
        /// </summary>
        /// <param name="action">Action, type of recurring transaction</param>
        /// <param name="recurringInfo">Recurring Info object.</param>
        /// <param name="userInfo">User Info object populated with user credentials.</param>
        /// <param name="payflowConnectionData">Connection credentials object.</param>
        /// <param name="invoice">Invoice object.</param>
        /// <param name="tender">Tender</param>
        /// <param name="requestId">Request Id</param>
        /// <remarks>
        ///     Each derived class of RecurringTransaction specifies a unique action
        ///     transaction. This class can also be directly used to perform a recurring
        ///     transaction. Alternatively, a new class can be extended from this to
        ///     create a specific recurring action transaction.
        /// </remarks>
        /// <example>
        ///     <code lang="C#" escaped="false">
        ///     ...............
        ///     // Populate data objects
        ///     ...............
        ///     //Set the Recurring related information.
        ///     RecurringInfo RecurInfo = new RecurringInfo();
        ///     // The date that the first payment will be processed.
        ///     // This will be of the format mmddyyyy.
        ///     RecurInfo.Start = "01012009";
        ///     RecurInfo.ProfileName = "PayPal";
        ///     // Specifies how often the payment occurs. All PAYPERIOD values must use
        ///     // capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
        ///     // QTER / SMYR / YEAR
        ///     RecurInfo.PayPeriod = "WEEK";
        ///     ///////////////////////////////////////////////////////////////////
        ///     // Create a new Recurring Transaction.
        ///     RecurringTransaction Trans = new RecurringTransaction("A", RecurInfo,
        ///         User, Connection, Inv, Tender, PayflowUtility.RequestId);
        ///     // Submit the transaction.
        ///     Response Resp = Trans.SubmitTransaction();
        ///     if (Resp != null)
        ///     {
        ///         // Get the Transaction Response parameters.
        ///         TransactionResponse TrxnResponse =  Resp.TransactionResponse;
        ///         if (TrxnResponse != null)
        ///         {
        ///             Console.WriteLine("RESULT = " + TrxnResponse.Result);
        ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
        ///         }
        ///         // Get the Recurring Response parameters.
        ///         RecurringResponse RecurResponse = Resp.RecurringResponse;
        ///         if (RecurResponse != null)
        ///         {
        ///             Console.WriteLine("RPREF = " + RecurResponse.RPRef);
        ///             Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId);
        ///         }
        ///     }
        ///     // Get the Context and check for any contained SDK specific errors.
        ///     Context Ctx = Resp.TransactionContext;
        ///     if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
        ///     {
        ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
        ///     }
        ///
        ///  </code>
        ///     <code lang="Visual Basic" escaped="false">
        ///     ...............
        ///     ' Populate data objects
        ///     ...............
        ///     'Set the Recurring related information.
        ///       Dim RecurInfo As RecurringInfo = New RecurringInfo
        ///       ' The date that the first payment will be processed.
        ///       ' This will be of the format mmddyyyy.
        ///       RecurInfo.Start = "01012009"
        ///       RecurInfo.ProfileName = "PayPal"
        ///       ' Specifies how often the payment occurs. All PAYPERIOD values must use
        ///       ' capital letters and can be any of WEEK / BIWK / SMMO / FRWK / MONT /
        ///       ' QTER / SMYR / YEAR
        ///       RecurInfo.PayPeriod = "WEEK"
        ///       '/////////////////////////////////////////////////////////////////
        ///       ' Create a new Recurring Transaction.
        ///       Dim Trans As RecurringTransaction = New RecurringTransaction("A", RecurInfo,
        ///         User, Connection, Inv, Tender, PayflowUtility.RequestId)
        ///       ' Submit the transaction.
        ///       Dim Resp As Response = Trans.SubmitTransaction()
        ///       If Not Resp Is Nothing Then
        ///           ' Get the Transaction Response parameters.
        ///           Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
        ///           If Not TrxnResponse Is Nothing Then
        ///               Console.WriteLine("RESULT = " + TrxnResponse.Result)
        ///               Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
        ///           End If
        ///           ' Get the Recurring Response parameters.
        ///           Dim RecurResponse As RecurringResponse = Resp.RecurringResponse
        ///           If Not RecurResponse Is Nothing Then
        ///               Console.WriteLine("RPREF = " + RecurResponse.RPRef)
        ///               Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId)
        ///           End If
        ///       End If
        ///       ' Get the Context and check for any contained SDK specific errors.
        ///       Dim Ctx As Context = Resp.TransactionContext
        ///       If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
        ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
        ///       End If
        ///
        ///     </code>
        /// </example>
        public RecurringTransaction(
            string action,
            RecurringInfo recurringInfo,
            UserInfo userInfo,
            PayflowConnectionData payflowConnectionData,
            Invoice invoice,
            BaseTender tender, string requestId)
            : base(PayflowConstants.TrxtypeRecurring,
                   userInfo, payflowConnectionData, invoice,
                   tender, requestId)
        {
            if (recurringInfo != null)
            {
                _mRecurringInfo         = recurringInfo;
                _mRecurringInfo.Context = Context;
            }

            _mAction = action;
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="TrxType">Transaction Type</param>
 /// <param name="OrigId">Original Transaction Id.</param>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object.</param>
 /// <param name="RequestId">Request Id</param>
 /// <remarks>This class can be derived to create a new reference transaction
 /// or can be used as is to submit a new type of reference transaction.
 /// <para>A reference transaction is a transaction which always takes
 ///  the PNRef of a previously submitted transaction.</para>
 /// </remarks>
 public ReferenceTransaction(String TrxType, String OrigId, UserInfo UserInfo, Invoice Invoice, BaseTender Tender, String RequestId) : this(TrxType, OrigId, UserInfo, null, Invoice, Tender, RequestId)
 {
 }
 /// <summary>
 ///     Constructor.
 /// </summary>
 /// <param name="origId">Original Transaction Id</param>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object.</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     Capture transaction needs to be performed on a successful
 ///     authorization transaction in order to capture the amount. Therefore, a
 ///     capture transaction always takes the PNRef of a authorization transaction.
 /// </remarks>
 /// <example>
 ///     <code lang="C#" escaped="false">
 ///     ...............
 ///     // Populate data objects
 ///     ...............
 ///
 ///     // Create a new Capture Transaction.
 ///     CaptureTransaction Trans = new CaptureTransaction("PNRef of Authorization transaction",
 ///         User,  Inv, Tender, PayflowUtility.RequestId);
 ///
 ///     // Submit the transaction.
 ///     Response Resp = Trans.SubmitTransaction();
 ///
 ///     if (Resp != null)
 ///     {
 ///         TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///         if (TrxnResponse != null)
 ///         {
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///             Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///             Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode);
 ///             Console.WriteLine("AVSADDR = " + TrxnResponse.AVSAddr);
 ///             Console.WriteLine("AVSZIP = " + TrxnResponse.AVSZip);
 ///         }
 ///     }
 ///
 ///     // Get the Context and check for any contained SDK specific errors.
 ///     Context Ctx = Resp.TransactionContext;
 ///     if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///     {
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///     }
 ///
 ///     </code>
 ///     <code lang="Visual Basic" escaped="false">
 ///     ...............
 ///     ' Populate data objects
 ///     ...............
 ///     ' Create a new Capture Transaction.
 ///     Dim Trans As CaptureTransaction = New CaptureTransaction("PNRef of Authorization transaction", User,
 ///                                      Inv, Tender, PayflowUtility.RequestId)
 ///     ' Submit the transaction.
 ///     Dim Resp As Response = Trans.SubmitTransaction()
 ///     If Not Resp Is Nothing Then
 ///         Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///         If Not TrxnResponse Is Nothing Then
 ///             Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///             Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///             Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///             Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode)
 ///             Console.WriteLine("AVSADDR = " + TrxnResponse.AVSAddr)
 ///             Console.WriteLine("AVSZIP = " + TrxnResponse.AVSZip)
 ///         End If
 ///     End If
 ///     ' Get the Context and check for any contained SDK specific errors.
 ///     Dim Ctx As Context = Resp.TransactionContext
 ///     If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///         Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///     End If
 ///
 ///     </code>
 /// </example>
 public CaptureTransaction(string origId, UserInfo userInfo, Invoice invoice, BaseTender tender,
                           string requestId) : this(origId, userInfo, null, invoice, tender, requestId)
 {
 }
 /// <summary>
 ///     Constructor.
 /// </summary>
 /// <param name="trxType">Transaction type.</param>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object such as  Card Tender.</param>
 /// <param name="requestId">Request Id</param>
 public BaseTransaction(string trxType, UserInfo userInfo,
                        Invoice invoice,
                        BaseTender tender, string requestId) : this(trxType, userInfo, null, invoice, tender, requestId)
 {
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="TrxType"></param>
 /// <param name="UserInfo"></param>
 /// <param name="Invoice"></param>
 /// <param name="Tender"></param>
 /// <param name="RequestId"></param>
 internal AuthorizationTransaction(String TrxType, UserInfo UserInfo, Invoice Invoice,
                                   BaseTender Tender, String RequestId)
     : this(TrxType, UserInfo, null, Invoice, Tender, RequestId)
 {
 }
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="trxType">Transaction Type</param>
 /// <param name="origId">Original Transaction Id.</param>
 /// <param name="userInfo">User Info object populated with user credentials.</param>
 /// <param name="invoice">Invoice object.</param>
 /// <param name="tender">Tender object.</param>
 /// <param name="requestId">Request Id</param>
 /// <remarks>
 ///     This class can be derived to create a new reference transaction
 ///     or can be used as is to submit a new type of reference transaction.
 ///     <para>
 ///         A reference transaction is a transaction which always takes
 ///         the PNRef of a previously submitted transaction.
 ///     </para>
 /// </remarks>
 public ReferenceTransaction(string trxType, string origId, UserInfo userInfo, Invoice invoice,
                             BaseTender tender, string requestId) : this(trxType, origId, userInfo, null, invoice, tender, requestId)
 {
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="OrigId">Original Transaction Id</param>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object.</param>
 /// <param name="RequestId">Request Id</param>
 ///	<remarks>Reference credit transaction can be performed on successful
 ///	transactions in order to credit the amount. Therefore, a
 ///	reference credit transaction takes the PNRef of a previous transaction.
 ///	</remarks>
 ///	<example>
 ///	<code lang="C#" escaped="false">
 ///	...............
 ///	// Populate data objects
 ///	...............
 ///
 ///	// Create a new Credit Transaction.
 ///	// Following is an example of a reference credit type of transaction.
 ///	CreditTransaction Trans = new CreditTransaction("PNRef of a previous transaction.",
 ///		User, Inv, Tender, PayflowUtility.RequestId);
 ///
 ///	// Submit the transaction.
 ///	Response Resp = Trans.SubmitTransaction();
 ///
 ///	if (Resp != null)
 ///	{
 ///		// Get the Transaction Response parameters.
 ///		TransactionResponse TrxnResponse =  Resp.TransactionResponse;
 ///		if (TrxnResponse != null)
 ///		{
 ///			Console.WriteLine("RESULT = " + TrxnResponse.Result);
 ///			Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
 ///			Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
 ///		}
 ///	}
 ///
 ///	// Get the Context and check for any contained SDK specific errors.
 ///	Context Ctx = Resp.TransactionContext;
 ///	if (Ctx != null &amp;&amp; Ctx.getErrorCount() > 0)
 ///	{
 ///		Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString());
 ///	}
 ///
 ///
 ///	</code>
 ///	<code lang="Visual Basic" escaped="false">
 ///	...............
 ///	' Populate data objects
 ///	...............
 ///	' Create a new Credit Transaction.
 ///	' Following is an example of a reference credit type of transaction.
 ///	Dim Trans As CreditTransaction = New CreditTransaction("PNRef of a previous transaction.", User,
 ///						 Inv, Tender, PayflowUtility.RequestId)
 ///		' Submit the transaction.
 ///	Dim Resp As Response = Trans.SubmitTransaction()
 ///
 ///	If Not Resp Is Nothing Then
 ///	    ' Get the Transaction Response parameters.
 ///	    Dim TrxnResponse As TransactionResponse = Resp.TransactionResponse
 ///	    If Not TrxnResponse Is Nothing Then
 ///	        Console.WriteLine("RESULT = " + TrxnResponse.Result)
 ///	        Console.WriteLine("PNREF = " + TrxnResponse.Pnref)
 ///	        Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg)
 ///	    End If
 ///	End If
 ///
 ///	' Get the Context and check for any contained SDK specific errors.
 ///	Dim Ctx As Context = Resp.TransactionContext
 ///	If Not Ctx Is Nothing AndAlso Ctx.getErrorCount() > 0 Then
 ///	    Console.WriteLine(Environment.NewLine + "Errors = " + Ctx.ToString())
 ///	End If
 ///
 ///	</code>
 ///	</example>
 public CreditTransaction(String OrigId, UserInfo UserInfo, Invoice Invoice, BaseTender Tender, String RequestId) : this(OrigId, UserInfo, null, Invoice, Tender, RequestId)
 {
 }
Example #29
0
        public static void Main(string[] Args)
        {
            Console.WriteLine("------------------------------------------------------");
            Console.WriteLine("Executing Sample from File: DOReference.cs");
            Console.WriteLine("------------------------------------------------------");

            // Create the Data Objects.
            // Create the User data object with the required user details.
            UserInfo User = new UserInfo("<user>", "<vendor>", "<partner>", "<password>");

            // Create the Payflow  Connection data object with the required connection details.
            // The PAYFLOW_HOST property is defined in the App config file.
            PayflowConnectionData Connection = new PayflowConnectionData();

            // Create a new Invoice data object with the Amount, Billing Address etc. details.
            Invoice Inv = new Invoice();

            // Set Amount.
            Currency Amt = new Currency(new decimal(25.12));

            Inv.Amt = Amt;

            // Create a new Tender - Base Tender data object and set the Tender Type to "C".
            // We do not pass any payment device
            BaseTender Tender = new BaseTender("C", null);
            // To modify the expiration date, we wil also need to create a CreditCard object
            // without passing the credit card number.
            //CreditCard CC = new CreditCard(null, "1215");
            //CardTender Card = new CardTender(CC);

            // Create a new Reference Transaction.
            ReferenceTransaction Trans = new ReferenceTransaction("S", "<PNREF>", User, Connection, Inv, PayflowUtility.RequestId);
            // If expiration date is changed too.
            //ReferenceTransaction Trans = new ReferenceTransaction("S", "<PNREF>", User, Connection, Inv, Card, PayflowUtility.RequestId);

            // You can also change the expiration date of the new reference transaction, by passing the EXPDATE via the ExtendData object.
            //ExtendData ExpDate = new ExtendData("EXPDATE", "1215");
            //Trans.AddToExtendData(ExpDate);

            // Submit the Transaction
            Response Resp = Trans.SubmitTransaction();

            // Display the transaction response parameters.
            if (Resp != null)
            {
                // Get the Transaction Response parameters.
                TransactionResponse TrxnResponse = Resp.TransactionResponse;

                if (TrxnResponse != null)
                {
                    Console.WriteLine("RESULT = " + TrxnResponse.Result);
                    Console.WriteLine("PNREF = " + TrxnResponse.Pnref);
                    Console.WriteLine("RESPMSG = " + TrxnResponse.RespMsg);
                    Console.WriteLine("AUTHCODE = " + TrxnResponse.AuthCode);
                    Console.WriteLine("AVSADDR = " + TrxnResponse.AVSAddr);
                    Console.WriteLine("AVSZIP = " + TrxnResponse.AVSZip);
                    Console.WriteLine("IAVS = " + TrxnResponse.IAVS);
                }

                // Get the Fraud Response parameters.
                FraudResponse FraudResp = Resp.FraudResponse;
                // Display Fraud Response parameter
                if (FraudResp != null)
                {
                    Console.WriteLine("PREFPSMSG = " + FraudResp.PreFpsMsg);
                    Console.WriteLine("POSTFPSMSG = " + FraudResp.PostFpsMsg);
                }

                // Display the response.
                Console.WriteLine(Environment.NewLine + PayflowUtility.GetStatus(Resp));


                // Get the Transaction Context and check for any contained SDK specific errors (optional code).
                Context TransCtx = Resp.TransactionContext;
                if (TransCtx != null && TransCtx.getErrorCount() > 0)
                {
                    Console.WriteLine(Environment.NewLine + "Transaction Errors = " + TransCtx.ToString());
                }
            }
            Console.WriteLine("Press Enter to Exit ...");
            Console.ReadLine();
        }
Example #30
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="TrxType">Transaction type.</param>
 /// <param name="UserInfo">User Info object populated with user credentials.</param>
 /// <param name="Invoice">Invoice object.</param>
 /// <param name="Tender">Tender object such as  Card Tender.</param>
 /// <param name="RequestId">Request Id</param>
 public BaseTransaction(String TrxType, UserInfo UserInfo,
                        Invoice Invoice,
                        BaseTender Tender, String RequestId) : this(TrxType, UserInfo, null, Invoice, Tender, RequestId)
 {
 }