public void run() { var configuration = new Configuration { AppKey = BaseContext.AppKey, AppSid = BaseContext.AppSid }; TasksApi api = new TasksApi(configuration); RecurringInfo recurringInfo = new RecurringInfo { RecurrencePattern = RecurrencePattern.Weekly, Occurrences = 4, WeeklyRepetitions = 3, WeeklyDays = WeekDayType.Thursday | WeekDayType.Wednesday, StartDate = new DateTime(2018, 1, 1), EndDate = new DateTime(2018, 12, 31), UseEndDate = true }; var response = api.PostTaskRecurringInfo(new PostTaskRecurringInfoRequest { Name = "sample.mpp", Storage = "Tasks", Folder = "", ParentTaskUid = 0, RecurringInfo = recurringInfo, TaskName = "New recurring task", CalendarName = "Standard" }); Console.WriteLine(response.Code); }
/// <summary> /// Constructor /// </summary> /// <param name="userInfo">User Info object populated with user credentials.</param> /// <param name="recurringInfo">RecurringInfo object.</param> /// <param name="invoice">Invoice object.</param> /// <param name="requestId">Request Id</param> /// <remarks> /// RecurringPaymentTransaction action performs a real-time retry on /// a transaction that is in the retry state. The response string is similar /// to the string for Optional transactions, except that, upon approval, /// the profile is updated to reflect the successful retry. /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// RecurInfo.PaymentNum = "01012009"; /// // 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; /// Inv.PoNum = "PO12345"; /// Inv.InvNum = "INV12345"; /// // Set the Billing Address details. /// BillTo Bill = new BillTo(); /// Bill.BillToStreet = "123 Main St."; /// Bill.BillToZip = "12345"; /// Inv.BillTo = Bill; /// /////////////////////////////////////////////////////////////////// /// // Create a new Recurring Payment Transaction. /// RecurringPaymentTransaction Trans = new RecurringPaymentTransaction( /// User, RecurInfo, Inv, 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); /// } /// } /// /// </code> /// <code lang="Visual Basic" escaped="false"> /// ............... /// ' Populate data objects /// ............... /// 'Set the Recurring related information. /// Dim RecurInfo As RecurringInfo = New RecurringInfo /// RecurInfo.OrigProfileId = "RT0000001350" /// RecurInfo.PaymentNum = "01012009" /// ' Create a new Invoice data object with the Amount, Billing Address etc. details. /// Dim Inv As Invoice = New Invoice /// ' Set Amount. /// Dim Amt As Currency = New Currency(New Decimal(25.12)) /// Inv.Amt = Amt /// Inv.PoNum = "PO12345" /// Inv.InvNum = "INV12345" /// ' Set the Billing Address details. /// Dim Bill As BillTo = New BillTo /// Bill.BillToStreet = "123 Main St." /// Bill.BillToZip = "12345" /// Inv.BillTo = Bill /// '///////////////////////////////////////////////////////////////// /// ' Create a new Recurring Payment Transaction. /// Dim Trans As RecurringPaymentTransaction = New RecurringPaymentTransaction(User, /// RecurInfo, Inv, 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 RecurringPaymentTransaction( UserInfo userInfo, RecurringInfo recurringInfo, Invoice invoice, string requestId) : this(userInfo, null, recurringInfo, invoice, requestId) { }
public static void Main(string[] Args) { Console.WriteLine("------------------------------------------------------"); Console.WriteLine("Executing Sample from File: DORecurringReActivate.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(); RecurringInfo RecurInfo = new RecurringInfo(); RecurInfo.OrigProfileId = "<PROFILE_ID>"; // RT0000001350 // The date that the first payment will be processed. // This will be of the format mmddyyyy. RecurInfo.Start = "01012009"; // Create a new Recurring ReActivate Transaction. RecurringReActivateTransaction Trans = new RecurringReActivateTransaction( User, Connection, RecurInfo, PayflowUtility.RequestId); // 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("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); } // 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(); }
private void SetPayPeriod(RecurringInfo recurringInfo, DefinedValueCache transactionFrequencyValue) { recurringInfo.MaxFailPayments = 0; recurringInfo.Term = 0; var selectedFrequencyGuid = transactionFrequencyValue.Guid.ToString().ToUpper(); switch (selectedFrequencyGuid) { case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_ONE_TIME: recurringInfo.PayPeriod = "YEAR"; recurringInfo.Term = 1; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_WEEKLY: recurringInfo.PayPeriod = "WEEK"; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_BIWEEKLY: recurringInfo.PayPeriod = "BIWK"; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_TWICEMONTHLY: recurringInfo.PayPeriod = "SMMO"; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_MONTHLY: recurringInfo.PayPeriod = "MONT"; break; } }
/// <summary> /// Constructor /// </summary> /// <param name="UserInfo">User Info object populated with user credentials.</param> /// <param name="RecurringInfo">RecurringInfo object.</param> /// <param name="Invoice">Invoice object.</param> /// <param name="RequestId">Request Id</param> /// <remarks> /// RecurringPaymentTransaction action performs a real-time retry on /// a transaction that is in the retry state. The response string is similar /// to the string for Optional transactions, except that, upon approval, /// the profile is updated to reflect the successful retry. /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// RecurInfo.PaymentNum = "01012009"; /// /// // 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; /// Inv.PoNum = "PO12345"; /// Inv.InvNum = "INV12345"; /// /// // Set the Billing Address details. /// BillTo Bill = new BillTo(); /// Bill.BillToStreet = "123 Main St."; /// Bill.BillToZip = "12345"; /// Inv.BillTo = Bill; /// /////////////////////////////////////////////////////////////////// /// /// // Create a new Recurring Payment Transaction. /// RecurringPaymentTransaction Trans = new RecurringPaymentTransaction( /// User, RecurInfo, Inv, 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); /// } /// } /// /// /// </code> /// <code lang="Visual Basic" escaped="false"> /// ............... /// ' Populate data objects /// ............... /// 'Set the Recurring related information. /// Dim RecurInfo As RecurringInfo = New RecurringInfo /// RecurInfo.OrigProfileId = "RT0000001350" /// RecurInfo.PaymentNum = "01012009" /// /// ' Create a new Invoice data object with the Amount, Billing Address etc. details. /// Dim Inv As Invoice = New Invoice /// /// ' Set Amount. /// Dim Amt As Currency = New Currency(New Decimal(25.12)) /// Inv.Amt = Amt /// Inv.PoNum = "PO12345" /// Inv.InvNum = "INV12345" /// /// ' Set the Billing Address details. /// Dim Bill As BillTo = New BillTo /// Bill.BillToStreet = "123 Main St." /// Bill.BillToZip = "12345" /// Inv.BillTo = Bill /// '///////////////////////////////////////////////////////////////// /// /// ' Create a new Recurring Payment Transaction. /// Dim Trans As RecurringPaymentTransaction = New RecurringPaymentTransaction(User, /// RecurInfo, Inv, 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 RecurringPaymentTransaction( UserInfo UserInfo, RecurringInfo RecurringInfo, Invoice Invoice, String RequestId) : this(UserInfo, null, RecurringInfo, Invoice, RequestId) { }
private void SetPayPeriod(RecurringInfo recurringInfo, DefinedValueCache transactionFrequencyValue) { recurringInfo.MaxFailPayments = 0; recurringInfo.Term = 0; var selectedFrequencyGuid = transactionFrequencyValue.Guid.ToString().ToUpper(); // see https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/wpppe_rp_guide.pdf for how these are implemented switch (selectedFrequencyGuid) { case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_ONE_TIME: recurringInfo.PayPeriod = "YEAR"; recurringInfo.Term = 1; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_WEEKLY: recurringInfo.PayPeriod = "WEEK"; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_BIWEEKLY: recurringInfo.PayPeriod = "BIWK"; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_TWICEMONTHLY: recurringInfo.PayPeriod = "SMMO"; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_MONTHLY: recurringInfo.PayPeriod = "MONT"; break; } }
/// <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="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, 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 && 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, 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, String RequestId) : this(Action, RecurringInfo, UserInfo, null, Invoice, 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="invoice">Invoice Object</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, 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 && 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, 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, string requestId) : this(action, recurringInfo, userInfo, null, invoice, requestId) { }
/// <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 && 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="UserInfo">User Info object populated with user credentials.</param> /// <param name="PayflowConnectionData">Connection credentials object.</param> /// <param name="RecurringInfo">RecurringInfo object.</param> /// <param name="RequestId">Request Id</param> /// <remarks> RecurringCancelTransaction is used to cancel the recurring profile /// to deactivate the profile from performing further transactions. The profile is /// marked as cancelled and the customer is no longer billed. PayPal records the /// cancellation date. /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// /////////////////////////////////////////////////////////////////// /// /// // Create a new Recurring Cancel Transaction. /// RecurringCancelTransaction Trans = new RecurringCancelTransaction( /// User, Connection, 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 && 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 /// RecurInfo.OrigProfileId = "RT0000001350" /// '///////////////////////////////////////////////////////////////// /// /// ' Create a new Recurring Cancel Transaction. /// Dim Trans As RecurringCancelTransaction = New RecurringCancelTransaction(User, /// Connection, 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 RecurringCancelTransaction( UserInfo UserInfo, PayflowConnectionData PayflowConnectionData, RecurringInfo RecurringInfo, String RequestId) : base(PayflowConstants.RECURRING_ACTION_CANCEL, RecurringInfo, UserInfo, PayflowConnectionData, RequestId) { }
/// <summary> /// Constructor /// </summary> /// <param name="userInfo">User Info object populated with user credentials.</param> /// <param name="payflowConnectionData">Connection credentials object.</param> /// <param name="recurringInfo">RecurringInfo object.</param> /// <param name="requestId">Request Id</param> /// <remarks> /// RecurringCancelTransaction is used to cancel the recurring profile /// to deactivate the profile from performing further transactions. The profile is /// marked as cancelled and the customer is no longer billed. PayPal records the /// cancellation date. /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// /////////////////////////////////////////////////////////////////// /// /// // Create a new Recurring Cancel Transaction. /// RecurringCancelTransaction Trans = new RecurringCancelTransaction( /// User, Connection, 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 && 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 /// RecurInfo.OrigProfileId = "RT0000001350" /// '///////////////////////////////////////////////////////////////// /// /// ' Create a new Recurring Cancel Transaction. /// Dim Trans As RecurringCancelTransaction = New RecurringCancelTransaction(User, /// Connection, 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 RecurringCancelTransaction( UserInfo userInfo, PayflowConnectionData payflowConnectionData, RecurringInfo recurringInfo, string requestId) : base(PayflowConstants.RecurringActionCancel, recurringInfo, userInfo, payflowConnectionData, requestId) { }
/// <summary> /// Constructor /// </summary> /// <param name="userInfo">User Info object populated with user credentials.</param> /// <param name="payflowConnectionData">Connection credentials object.</param> /// <param name="recurringInfo">RecurringInfo object.</param> /// <param name="requestId">Request Id</param> /// <remarks> /// RecurringReactivatetransaction reactivates a profile with inactive STATUS. /// (Profiles can be deactivated for the following reasons: the term has completed, /// the profile reached maximum allowable payment failures, or the profile is canceled.) /// Reactivation gives the option to alter any profile parameter, including an /// Optional Transaction and a new start date must be specified . /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// // The date that the first payment will be processed. /// // This will be of the format mmddyyyy. /// RecurInfo.Start = "01012009"; /// /////////////////////////////////////////////////////////////////// /// // Create a new Recurring ReActivate Transaction. /// RecurringReActivateTransaction Trans = new RecurringReActivateTransaction( /// User, Connection, 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 && 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 /// RecurInfo.OrigProfileId = "RT0000001350" /// ' The date that the first payment will be processed. /// ' This will be of the format mmddyyyy. /// RecurInfo.Start = "01012009" /// '///////////////////////////////////////////////////////////////// /// ' Create a new Recurring ReActivate Transaction. /// Dim Trans As RecurringReActivateTransaction = New RecurringReActivateTransaction(User, /// Connection, 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 RecurringReActivateTransaction( UserInfo userInfo, PayflowConnectionData payflowConnectionData, RecurringInfo recurringInfo, string requestId) : base(PayflowConstants.RecurringActionReactivate, recurringInfo, userInfo, payflowConnectionData, requestId) { }
/// <summary> /// Constructor /// </summary> /// <param name="UserInfo">User Info object populated with user credentials.</param> /// <param name="PayflowConnectionData">Connection credentials object.</param> /// <param name="RecurringInfo">RecurringInfo object.</param> /// <param name="RequestId">Request Id</param> /// <remarks> /// RecurringReactivatetransaction reactivates a profile with inactive STATUS. /// (Profiles can be deactivated for the following reasons: the term has completed, /// the profile reached maximum allowable payment failures, or the profile is canceled.) /// Reactivation gives the option to alter any profile parameter, including an /// Optional Transaction and a new start date must be specified . /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// // The date that the first payment will be processed. /// // This will be of the format mmddyyyy. /// RecurInfo.Start = "01012009"; /// /////////////////////////////////////////////////////////////////// /// /// // Create a new Recurring ReActivate Transaction. /// RecurringReActivateTransaction Trans = new RecurringReActivateTransaction( /// User, Connection, 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 && 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 /// RecurInfo.OrigProfileId = "RT0000001350" /// ' The date that the first payment will be processed. /// ' This will be of the format mmddyyyy. /// RecurInfo.Start = "01012009" /// '///////////////////////////////////////////////////////////////// /// /// ' Create a new Recurring ReActivate Transaction. /// Dim Trans As RecurringReActivateTransaction = New RecurringReActivateTransaction(User, /// Connection, 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 RecurringReActivateTransaction( UserInfo UserInfo, PayflowConnectionData PayflowConnectionData, RecurringInfo RecurringInfo, String RequestId) : base(PayflowConstants.RECURRING_ACTION_REACTIVATE, RecurringInfo, UserInfo, PayflowConnectionData, RequestId) { }
/// <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 && 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="UserInfo">User Info object populated with user credentials.</param> /// <param name="PayflowConnectionData">Connection credentials object.</param> /// <param name="RecurringInfo">RecurringInfo object.</param> /// <param name="RequestId">Request Id</param> /// <remarks> /// RecurringInquiryTransaction is used to request two different sets of information: /// To view the full set of payment information for a profile, include the /// PAYMENTHISTORY=Y name/value pair with the Inquiry action. /// To view the status of a customer’s profile, submit an Inquiry action that does /// not include the PAYMENTHISTORY parameter (alternatively, submit /// PAYMENTHISTORY=N). /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// /////////////////////////////////////////////////////////////////// /// /// // Create a new Recurring Inquiry Transaction. /// RecurringInquiryTransaction Trans = new RecurringInquiryTransaction( /// User, Connection, 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); /// } /// /// // Get the Recurring Response parameters. /// RecurringResponse RecurResponse = Resp.RecurringResponse; /// if (RecurResponse != null) /// { /// Console.WriteLine("RPREF = " + RecurResponse.RPRef); /// Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId); /// Console.WriteLine("STATUS = " + RecurResponse.Status); /// Console.WriteLine("PROFILENAME = " + RecurResponse.ProfileName); /// Console.WriteLine("START = " + RecurResponse.Start); /// Console.WriteLine("TERM = " + RecurResponse.Term); /// Console.WriteLine("NEXTPAYMENT = " + RecurResponse.NextPayment); /// Console.WriteLine("PAYPERIOD = " + RecurResponse.PayPeriod); /// Console.WriteLine("NEXTPAYMENT = " + RecurResponse.NextPayment); /// Console.WriteLine("TENDER = " + RecurResponse.Tender); /// Console.WriteLine("AMT = " + RecurResponse.Amt); /// Console.WriteLine("ACCT = " + RecurResponse.Acct); /// Console.WriteLine("EXPDATE = " + RecurResponse.ExpDate); /// Console.WriteLine("AGGREGATEAMT = " + RecurResponse.AggregateAmt); /// Console.WriteLine("AGGREGATEOPTIONALAMT = " + RecurResponse.AggregateOptionalAmt); /// Console.WriteLine("MAXFAILPAYMENTS = " + RecurResponse.MaxFailPayments); /// Console.WriteLine("NUMFAILPAYMENTS = " + RecurResponse.NumFailPayments); /// Console.WriteLine("RETRYNUMDAYS = " + RecurResponse.RetryNumDays); /// Console.WriteLine("STREET = " + RecurResponse.Street); /// Console.WriteLine("ZIP = " + RecurResponse.Zip); /// } /// } /// /// // 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 data objects /// ............... /// 'Set the Recurring related information. /// Dim RecurInfo As RecurringInfo = New RecurringInfo /// RecurInfo.OrigProfileId = "RT0000001350" /// '///////////////////////////////////////////////////////////////// /// /// ' Create a new Recurring Inquiry Transaction. /// Dim Trans As RecurringInquiryTransaction = New RecurringInquiryTransaction(User, /// Connection, 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) /// 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) /// Console.WriteLine("STATUS = " + RecurResponse.Status) /// Console.WriteLine("PROFILENAME = " + RecurResponse.ProfileName) /// Console.WriteLine("START = " + RecurResponse.Start) /// Console.WriteLine("TERM = " + RecurResponse.Term) /// Console.WriteLine("NEXTPAYMENT = " + RecurResponse.NextPayment) /// Console.WriteLine("PAYPERIOD = " + RecurResponse.PayPeriod) /// Console.WriteLine("NEXTPAYMENT = " + RecurResponse.NextPayment) /// Console.WriteLine("TENDER = " + RecurResponse.Tender) /// Console.WriteLine("AMT = " + RecurResponse.Amt) /// Console.WriteLine("ACCT = " + RecurResponse.Acct) /// Console.WriteLine("EXPDATE = " + RecurResponse.ExpDate) /// Console.WriteLine("AGGREGATEAMT = " + RecurResponse.AggregateAmt) /// Console.WriteLine("AGGREGATEOPTIONALAMT = " + RecurResponse.AggregateOptionalAmt) /// Console.WriteLine("MAXFAILPAYMENTS = " + RecurResponse.MaxFailPayments) /// Console.WriteLine("NUMFAILPAYMENTS = " + RecurResponse.NumFailPayments) /// Console.WriteLine("RETRYNUMDAYS = " + RecurResponse.RetryNumDays) /// Console.WriteLine("STREET = " + RecurResponse.Street) /// Console.WriteLine("ZIP = " + RecurResponse.Zip) /// 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 RecurringInquiryTransaction( UserInfo UserInfo, PayflowConnectionData PayflowConnectionData, RecurringInfo RecurringInfo, String RequestId) : base(PayflowConstants.RECURRING_ACTION_INQUIRY, RecurringInfo, UserInfo, PayflowConnectionData, RequestId) { }
/// <summary> /// Constructor /// </summary> /// <param name="UserInfo">User Info object populated with user credentials.</param> /// <param name="PayflowConnectionData">Connection credentials object.</param> /// <param name="RecurringInfo">RecurringInfo object.</param> /// <param name="Invoice">Invoice object.</param> /// <param name="RequestId">Request Id</param> /// <remarks> /// RecurringPaymentTransaction action performs a real-time retry on /// a transaction that is in the retry state. The response string is similar /// to the string for Optional transactions, except that, upon approval, /// the profile is updated to reflect the successful retry. /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// RecurInfo.PaymentNum = "01012009"; /// /// // 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; /// Inv.PoNum = "PO12345"; /// Inv.InvNum = "INV12345"; /// /// // Set the Billing Address details. /// BillTo Bill = new BillTo(); /// Bill.BillToStreet = "123 Main St."; /// Bill.BillToZip = "12345"; /// Inv.BillTo = Bill; /// /////////////////////////////////////////////////////////////////// /// /// // Create a new Recurring Payment Transaction. /// RecurringPaymentTransaction Trans = new RecurringPaymentTransaction( /// User, Connection, RecurInfo, Inv, 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); /// } /// } /// /// /// </code> /// <code lang="Visual Basic" escaped="false"> /// ............... /// ' Populate data objects /// ............... /// 'Set the Recurring related information. /// Dim RecurInfo As RecurringInfo = New RecurringInfo /// RecurInfo.OrigProfileId = "RT0000001350" /// RecurInfo.PaymentNum = "01012009" /// /// ' Create a new Invoice data object with the Amount, Billing Address etc. details. /// Dim Inv As Invoice = New Invoice /// /// ' Set Amount. /// Dim Amt As Currency = New Currency(New Decimal(25.12)) /// Inv.Amt = Amt /// Inv.PoNum = "PO12345" /// Inv.InvNum = "INV12345" /// /// ' Set the Billing Address details. /// Dim Bill As BillTo = New BillTo /// Bill.BillToStreet = "123 Main St." /// Bill.BillToZip = "12345" /// Inv.BillTo = Bill /// '///////////////////////////////////////////////////////////////// /// /// ' Create a new Recurring Payment Transaction. /// Dim Trans As RecurringPaymentTransaction = New RecurringPaymentTransaction(User, /// Connection, RecurInfo, Inv, 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 RecurringPaymentTransaction( UserInfo UserInfo, PayflowConnectionData PayflowConnectionData, RecurringInfo RecurringInfo, Invoice Invoice, String RequestId) : base(PayflowConstants.RECURRING_ACTION_PAYMENT, RecurringInfo, UserInfo, PayflowConnectionData, Invoice, RequestId) { }
/// <summary> /// Constructor /// </summary> /// <param name="userInfo">User Info object populated with user credentials.</param> /// <param name="payflowConnectionData">Connection credentials object.</param> /// <param name="recurringInfo">RecurringInfo object.</param> /// <param name="invoice">Invoice object.</param> /// <param name="requestId">Request Id</param> /// <remarks> /// RecurringPaymentTransaction action performs a real-time retry on /// a transaction that is in the retry state. The response string is similar /// to the string for Optional transactions, except that, upon approval, /// the profile is updated to reflect the successful retry. /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// RecurInfo.PaymentNum = "01012009"; /// // 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; /// Inv.PoNum = "PO12345"; /// Inv.InvNum = "INV12345"; /// // Set the Billing Address details. /// BillTo Bill = new BillTo(); /// Bill.BillToStreet = "123 Main St."; /// Bill.BillToZip = "12345"; /// Inv.BillTo = Bill; /// /////////////////////////////////////////////////////////////////// /// // Create a new Recurring Payment Transaction. /// RecurringPaymentTransaction Trans = new RecurringPaymentTransaction( /// User, Connection, RecurInfo, Inv, 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); /// } /// } /// /// </code> /// <code lang="Visual Basic" escaped="false"> /// ............... /// ' Populate data objects /// ............... /// 'Set the Recurring related information. /// Dim RecurInfo As RecurringInfo = New RecurringInfo /// RecurInfo.OrigProfileId = "RT0000001350" /// RecurInfo.PaymentNum = "01012009" /// ' Create a new Invoice data object with the Amount, Billing Address etc. details. /// Dim Inv As Invoice = New Invoice /// ' Set Amount. /// Dim Amt As Currency = New Currency(New Decimal(25.12)) /// Inv.Amt = Amt /// Inv.PoNum = "PO12345" /// Inv.InvNum = "INV12345" /// ' Set the Billing Address details. /// Dim Bill As BillTo = New BillTo /// Bill.BillToStreet = "123 Main St." /// Bill.BillToZip = "12345" /// Inv.BillTo = Bill /// '///////////////////////////////////////////////////////////////// /// ' Create a new Recurring Payment Transaction. /// Dim Trans As RecurringPaymentTransaction = New RecurringPaymentTransaction(User, /// Connection, RecurInfo, Inv, 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 RecurringPaymentTransaction( UserInfo userInfo, PayflowConnectionData payflowConnectionData, RecurringInfo recurringInfo, Invoice invoice, string requestId) : base(PayflowConstants.RecurringActionPayment, recurringInfo, userInfo, payflowConnectionData, invoice, requestId) { }
private RecurringInfo GetRecurring(PaymentSchedule schedule) { var ppRecurringInfo = new RecurringInfo(); ppRecurringInfo.ProfileName = schedule.PersonId.ToString(); ppRecurringInfo.Start = schedule.StartDate.ToString("MMddyyyy"); SetPayPeriod(ppRecurringInfo, schedule.TransactionFrequencyValue); return(ppRecurringInfo); }
/// <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 && 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) { }
/// <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 && 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) { }
private RecurringInfo GetRecurring(FinancialScheduledTransaction schedule) { var ppRecurringInfo = new RecurringInfo(); ppRecurringInfo.OrigProfileId = schedule.GatewayScheduleId; ppRecurringInfo.Start = schedule.StartDate.ToString("MMddyyyy"); if (schedule.TransactionFrequencyValueId > 0) { SetPayPeriod(ppRecurringInfo, DefinedValueCache.Get(schedule.TransactionFrequencyValueId)); } return(ppRecurringInfo); }
public async Task TestAddRecurringTask() { var remoteName = await UploadFileToStorageAsync("sample.mpp"); RecurringInfo recurringInfo = new RecurringInfo { RecurrencePattern = RecurrencePattern.Weekly, Occurrences = 4, WeeklyRepetitions = 3, WeeklyDays = WeekDayType.Thursday | WeekDayType.Wednesday, StartDate = new DateTime(2018, 1, 1, 8, 0, 0), EndDate = new DateTime(2018, 12, 31), UseEndDate = true }; var response = await TasksApi.PostTaskRecurringInfoAsync(new PostTaskRecurringInfoRequest { Name = remoteName, Folder = this.DataFolder, ParentTaskUid = 0, RecurringInfo = recurringInfo, TaskName = "New recurring task", CalendarName = "Standard" }); Assert.AreEqual((int)HttpStatusCode.Created, response.Code); Assert.IsNotNull(response.TaskItem); var getTaskResponse = await TasksApi.GetTaskAsync( new GetTaskRequest { Name = remoteName, Folder = this.DataFolder, TaskUid = response.TaskItem.Uid }); Assert.AreEqual((int)HttpStatusCode.OK, getTaskResponse.Code); Assert.AreEqual(18, getTaskResponse.Task.SubtasksUids.Count); var lastTaskUid = getTaskResponse.Task.SubtasksUids.Max(); getTaskResponse = await TasksApi.GetTaskAsync( new GetTaskRequest { Name = remoteName, Folder = this.DataFolder, TaskUid = lastTaskUid.Value }); Assert.AreEqual(new DateTime(2018, 12, 27, 8, 0, 0), getTaskResponse.Task.Start); }
/// <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="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, 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 && 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, 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, String RequestId) : base(PayflowConstants.TRXTYPE_RECURRING, UserInfo, RequestId) { if (RecurringInfo != null) { mRecurringInfo = RecurringInfo; mRecurringInfo.Context = base.Context; } mAction = Action; }
/// <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="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, 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 && 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, 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, string requestId) : base(PayflowConstants.TrxtypeRecurring, userInfo, requestId) { if (recurringInfo != null) { _mRecurringInfo = recurringInfo; _mRecurringInfo.Context = Context; } _mAction = action; }
/// <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 && 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; }
/// <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 && 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="userInfo">User Info object populated with user credentials.</param> /// <param name="recurringInfo">RecurringInfo object.</param> /// <param name="requestId">Request Id</param> /// <remarks> /// RecurringReactivatetransaction reactivates a profile with inactive STATUS. /// (Profiles can be deactivated for the following reasons: the term has completed, /// the profile reached maximum allowable payment failures, or the profile is canceled.) /// Reactivation gives the option to alter any profile parameter, including an /// Optional Transaction and a new start date must be specified . /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// // The date that the first payment will be processed. /// // This will be of the format mmddyyyy. /// RecurInfo.Start = "01012009"; /// /////////////////////////////////////////////////////////////////// /// // Create a new Recurring ReActivate Transaction. /// RecurringReActivateTransaction Trans = new RecurringReActivateTransaction( /// User, 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 && 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 /// RecurInfo.OrigProfileId = "RT0000001350" /// ' The date that the first payment will be processed. /// ' This will be of the format mmddyyyy. /// RecurInfo.Start = "01012009" /// '///////////////////////////////////////////////////////////////// /// ' Create a new Recurring ReActivate Transaction. /// Dim Trans As RecurringReActivateTransaction = New RecurringReActivateTransaction(User, /// 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 RecurringReActivateTransaction( UserInfo userInfo, RecurringInfo recurringInfo, string requestId) : this(userInfo, null, recurringInfo, requestId) { }
/// <summary> /// Constructor /// </summary> /// <param name="userInfo">User Info object populated with user credentials.</param> /// <param name="recurringInfo">RecurringInfo object.</param> /// <param name="requestId">Request Id</param> /// <remarks> /// RecurringCancelTransaction is used to cancel the recurring profile /// to deactivate the profile from performing further transactions. The profile is /// marked as cancelled and the customer is no longer billed. PayPal records the /// cancellation date. /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// /////////////////////////////////////////////////////////////////// /// /// // Create a new Recurring Cancel Transaction. /// RecurringCancelTransaction Trans = new RecurringCancelTransaction( /// User, 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 && 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 /// RecurInfo.OrigProfileId = "RT0000001350" /// '///////////////////////////////////////////////////////////////// /// /// ' Create a new Recurring Cancel Transaction. /// Dim Trans As RecurringCancelTransaction = New RecurringCancelTransaction(User, /// 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 RecurringCancelTransaction( UserInfo userInfo, RecurringInfo recurringInfo, string requestId) : this(userInfo, null, recurringInfo, requestId) { }
public static void Main(string[] Args) { Console.WriteLine("------------------------------------------------------"); Console.WriteLine("Executing Sample from File: DORecurringPayment.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(); RecurringInfo RecurInfo = new RecurringInfo(); RecurInfo.OrigProfileId = "<PROFILE_ID>"; // RT0000001350 RecurInfo.PaymentNum = "2"; // The failed payment to be retried. // 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; Inv.PoNum = "PO12345"; Inv.InvNum = "INV12345"; // Set the Billing Address details. BillTo Bill = new BillTo(); Bill.BillToStreet = "123 Main St."; Bill.BillToZip = "12345"; Inv.BillTo = Bill; /////////////////////////////////////////////////////////////////// // Create a new Recurring Payment Transaction. RecurringPaymentTransaction Trans = new RecurringPaymentTransaction( User, Connection, RecurInfo, Inv, PayflowUtility.RequestId); // 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("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); } // 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(); }
private void SetPayPeriod( RecurringInfo recurringInfo, DefinedValueCache transactionFrequencyValue ) { recurringInfo.MaxFailPayments = 0; recurringInfo.Term = 0; var selectedFrequencyGuid = transactionFrequencyValue.Guid.ToString().ToUpper(); switch ( selectedFrequencyGuid ) { case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_ONE_TIME: recurringInfo.PayPeriod = "YEAR"; recurringInfo.Term = 1; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_WEEKLY: recurringInfo.PayPeriod = "WEEK"; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_BIWEEKLY: recurringInfo.PayPeriod = "BIWK"; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_TWICEMONTHLY: recurringInfo.PayPeriod = "SMMO"; break; case Rock.SystemGuid.DefinedValue.TRANSACTION_FREQUENCY_MONTHLY: recurringInfo.PayPeriod = "MONT"; break; } }
private RecurringInfo GetRecurring( FinancialScheduledTransaction schedule ) { var ppRecurringInfo = new RecurringInfo(); ppRecurringInfo.OrigProfileId = schedule.GatewayScheduleId; ppRecurringInfo.Start = schedule.StartDate.ToString( "MMddyyyy" ); if ( schedule.TransactionFrequencyValueId > 0 ) { SetPayPeriod( ppRecurringInfo, DefinedValueCache.Read( schedule.TransactionFrequencyValueId ) ); } return ppRecurringInfo; }
private RecurringInfo GetRecurring( PaymentSchedule schedule ) { var ppRecurringInfo = new RecurringInfo(); ppRecurringInfo.ProfileName = schedule.PersonId.ToString(); ppRecurringInfo.Start = schedule.StartDate.ToString( "MMddyyyy" ); SetPayPeriod( ppRecurringInfo, schedule.TransactionFrequencyValue ); return ppRecurringInfo; }
/// <summary> /// Constructor /// </summary> /// <param name="UserInfo">User Info object populated with user credentials.</param> /// <param name="RecurringInfo">RecurringInfo object.</param> /// <param name="RequestId">Request Id</param> /// <remarks> /// RecurringInquiryTransaction is used to request two different sets of information: /// To view the full set of payment information for a profile, include the /// PAYMENTHISTORY=Y name/value pair with the Inquiry action. /// To view the status of a customer’s profile, submit an Inquiry action that does /// not include the PAYMENTHISTORY parameter (alternatively, submit /// PAYMENTHISTORY=N). /// </remarks> /// <example> /// <code lang="C#" escaped="false"> /// ............... /// // Populate data objects /// ............... /// /// //Set the Recurring related information. /// RecurringInfo RecurInfo = new RecurringInfo(); /// RecurInfo.OrigProfileId = "RT0000001350"; /// /////////////////////////////////////////////////////////////////// /// /// // Create a new Recurring Inquiry Transaction. /// RecurringInquiryTransaction Trans = new RecurringInquiryTransaction( /// User, 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); /// } /// /// // Get the Recurring Response parameters. /// RecurringResponse RecurResponse = Resp.RecurringResponse; /// if (RecurResponse != null) /// { /// Console.WriteLine("RPREF = " + RecurResponse.RPRef); /// Console.WriteLine("PROFILEID = " + RecurResponse.ProfileId); /// Console.WriteLine("STATUS = " + RecurResponse.Status); /// Console.WriteLine("PROFILENAME = " + RecurResponse.ProfileName); /// Console.WriteLine("START = " + RecurResponse.Start); /// Console.WriteLine("TERM = " + RecurResponse.Term); /// Console.WriteLine("NEXTPAYMENT = " + RecurResponse.NextPayment); /// Console.WriteLine("PAYPERIOD = " + RecurResponse.PayPeriod); /// Console.WriteLine("NEXTPAYMENT = " + RecurResponse.NextPayment); /// Console.WriteLine("TENDER = " + RecurResponse.Tender); /// Console.WriteLine("AMT = " + RecurResponse.Amt); /// Console.WriteLine("ACCT = " + RecurResponse.Acct); /// Console.WriteLine("EXPDATE = " + RecurResponse.ExpDate); /// Console.WriteLine("AGGREGATEAMT = " + RecurResponse.AggregateAmt); /// Console.WriteLine("AGGREGATEOPTIONALAMT = " + RecurResponse.AggregateOptionalAmt); /// Console.WriteLine("MAXFAILPAYMENTS = " + RecurResponse.MaxFailPayments); /// Console.WriteLine("NUMFAILPAYMENTS = " + RecurResponse.NumFailPayments); /// Console.WriteLine("RETRYNUMDAYS = " + RecurResponse.RetryNumDays); /// Console.WriteLine("STREET = " + RecurResponse.Street); /// Console.WriteLine("ZIP = " + RecurResponse.Zip); /// } /// } /// /// // 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 data objects /// ............... /// 'Set the Recurring related information. /// Dim RecurInfo As RecurringInfo = New RecurringInfo /// RecurInfo.OrigProfileId = "RT0000001350" /// '///////////////////////////////////////////////////////////////// /// /// ' Create a new Recurring Inquiry Transaction. /// Dim Trans As RecurringInquiryTransaction = New RecurringInquiryTransaction(User, /// 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) /// 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) /// Console.WriteLine("STATUS = " + RecurResponse.Status) /// Console.WriteLine("PROFILENAME = " + RecurResponse.ProfileName) /// Console.WriteLine("START = " + RecurResponse.Start) /// Console.WriteLine("TERM = " + RecurResponse.Term) /// Console.WriteLine("NEXTPAYMENT = " + RecurResponse.NextPayment) /// Console.WriteLine("PAYPERIOD = " + RecurResponse.PayPeriod) /// Console.WriteLine("NEXTPAYMENT = " + RecurResponse.NextPayment) /// Console.WriteLine("TENDER = " + RecurResponse.Tender) /// Console.WriteLine("AMT = " + RecurResponse.Amt) /// Console.WriteLine("ACCT = " + RecurResponse.Acct) /// Console.WriteLine("EXPDATE = " + RecurResponse.ExpDate) /// Console.WriteLine("AGGREGATEAMT = " + RecurResponse.AggregateAmt) /// Console.WriteLine("AGGREGATEOPTIONALAMT = " + RecurResponse.AggregateOptionalAmt) /// Console.WriteLine("MAXFAILPAYMENTS = " + RecurResponse.MaxFailPayments) /// Console.WriteLine("NUMFAILPAYMENTS = " + RecurResponse.NumFailPayments) /// Console.WriteLine("RETRYNUMDAYS = " + RecurResponse.RetryNumDays) /// Console.WriteLine("STREET = " + RecurResponse.Street) /// Console.WriteLine("ZIP = " + RecurResponse.Zip) /// 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 RecurringInquiryTransaction( UserInfo UserInfo, RecurringInfo RecurringInfo, String RequestId) : this(UserInfo, null, RecurringInfo, RequestId) { }