Class RecurringInfo

java.lang.Object
paypal.payflow.RecurringInfo

public final class RecurringInfo extends Object
 
 Used for recurring transaction related information
 <p>RecurringInfo contains the required and optional parameters
 specific to all the recurring transactions.</p>

  Following examples shows how to use the RecurringInfo.
 ............................
 //Populate other data objects.
 ............................
 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());
 }

 Console.WriteLine(Environment.NewLine + "Press Enter to Exit ...");
 Console.ReadLine();
 
 }
 
  • Constructor Details

    • RecurringInfo

      public RecurringInfo()
      constructor
  • Method Details

    • getProfileName

      public String getProfileName()
      Gets the profileName parameter.
      Returns:
      - String

      Maps to Payflow Parameter: PROFILENAME

    • setProfileName

      public void setProfileName(String profileName)
      Sets the profileName parameter.
      Parameters:
      profileName - - String

      Maps to Payflow Parameter: PROFILENAME

    • getStart

      public String getStart()
      Gets the start parameter.

      Beginning date for the recurring billing cycle.

      Returns:
      - String

      Maps to Payflow Parameter: START

    • setStart

      public void setStart(String start)
      Sets the start parameter.

      Beginning date for the recurring billing cycle.

      Parameters:
      start - - String

      Maps to Payflow Parameter: START

    • getTerm

      public long getTerm()
      Gets the term parameter.

      Number of payments to be made over the life of the agreement.

      Returns:
      - String

      Maps to Payflow Parameter: TERM

    • setTerm

      public void setTerm(long term)
      Sets the term parameter.

      Number of payments to be made over the life of the agreement.

      Parameters:
      term - - String

      Maps to Payflow Parameter: TERM

    • getPayPeriod

      public String getPayPeriod()
      Gets the payPeriod parameter.

      Specifies how often the payment occurs.

      Returns:
      - String
        Value - Description
        WEEK  - Weekly - Every week on the same day of the week as the first payment.
        BIWK  - Every Two Weeks - Every other week on the same day of the week as the first payment.
        SMMO  - Twice Every Month - The 1st and 15th of the month.Results in 24 payments per year. SMMO can start on 1st to 15th of the month, second payment 15 days later or on the last day of the month.
        FRWK  - Every Four Weeks - Every 28 days from the previous payment date beginning with the first payment date. Results in 13 payments per year.
        MONT  - Monthly - Every month on the same date as the first payment. Results in 12 payments per year.
        QTER  - Quarterly - Every three months on the same date as the first payment.
        SMYR  - Twice Every Year - Every six months on the same date as the first payment.
        YEAR  - Yearly - Every twelve months on the same date as the first payment.
      
        Maps to Payflow Parameter: PAYPERIOD
        
    • setPayPeriod

      public void setPayPeriod(String payPeriod)
      Sets the payPeriod parameter.

      Specifies how often the payment occurs.

      Parameters:
      payPeriod - - String
        Value - Description
        WEEK  - Weekly - Every week on the same day of the week as the first payment.
        BIWK  - Every Two Weeks - Every other week on the same day of the week as the first payment.
        SMMO  - Twice Every Month - The 1st and 15th of the month.Results in 24 payments per year. SMMO can start on 1st to 15th of the month, second payment 15 days later or on the last day of the month.
        FRWK  - Every Four Weeks - Every 28 days from the previous payment date beginning with the first payment date. Results in 13 payments per year.
        MONT  - Monthly - Every month on the same date as the first payment. Results in 12 payments per year.
        QTER  - Quarterly - Every three months on the same date as the first payment.
        SMYR  - Twice Every Year - Every six months on the same date as the first payment.
        YEAR  - Yearly - Every twelve months on the same date as the first payment.
      
        Maps to Payflow Parameter: PAYPERIOD
        
    • getOptionalTrx

      public String getOptionalTrx()
      Gets the optionalTrx parameter.

      Defines an optional Authorization for validating the account information or for charging an initial fee. If this transaction fails, then the profile is not generated. OPTIONALTRX=A only applies to credit card transactions.

      S represents an initial fee.

      Returns:
      - String

      Maps to Payflow Parameter: OPTIONALTRX

    • setOptionalTrx

      public void setOptionalTrx(String optionalTrx)
      Sets the optionalTrx parameter.

      Defines an optional Authorization for validating the account information or for charging an initial fee. If this transaction fails, then the profile is not generated. OPTIONALTRX=A only applies to credit card transactions.

      S represents an initial fee.

      Parameters:
      optionalTrx - - String

      Maps to Payflow Parameter: OPTIONALTRX

    • getOptionalTrxAmt

      public Currency getOptionalTrxAmt()
      Gets the optionalTrxAmt parameter.

      Amount of the Optional Transaction. Required only when OPTIONALTRX=S. Optional when OPTIONALTRX=A ($1 Authorization by default)

      Returns:
      - String

      Maps to Payflow Parameter: OPTIONALTRXAMT

    • setOptionalTrxAmt

      public void setOptionalTrxAmt(Currency optionalTrxAmt)
      Sets the optionalTrxAmt parameter.

      Amount of the Optional Transaction. Required only when OPTIONALTRX=S. Optional when OPTIONALTRX=A ($1 Authorization by default)

      Parameters:
      optionalTrxAmt - - String

      Maps to Payflow Parameter: OPTIONALTRXAMT

    • getRetryNumDays

      public long getRetryNumDays()
      Gets the retryNumDays parameter.

      The number of consecutive days that Gateway should attempt to process a failed transaction until Approved status is received.

      Returns:
      - String

      Maps to Payflow Parameter: RETRYNUMDAYS

    • setRetryNumDays

      public void setRetryNumDays(long retryNumDays)
      Sets the retryNumDays parameter.

      The number of consecutive days that Gateway should attempt to process a failed transaction until Approved status is received.

      Parameters:
      retryNumDays - - String

      Maps to Payflow Parameter: RETRYNUMDAYS

    • getMaxFailPayments

      public long getMaxFailPayments()
      Gets the maxFailPayments parameter. *

      * The number of payment periods (specified by PAYPERIOD) for which the transaction is allowed to fail before PayPal cancels a profile.

      Returns:
      - String

      Maps to Payflow Parameter: MAXFAILPAYMENTS

    • setMaxFailPayments

      public void setMaxFailPayments(long maxFailPayments)
      Sets the maxFailPayments parameter. *

      * The number of payment periods (specified by PAYPERIOD) for which the transaction is allowed to fail before PayPal cancels a profile.

      Parameters:
      maxFailPayments - - String

      Maps to Payflow Parameter: MAXFAILPAYMENTS

    • getOrigProfileId

      public String getOrigProfileId()
      Gets the origProfileId parameter.

      Required for Modify/Cancel/Inquiry/Retry action. Profile IDs for test profiles start with RT. Profile IDs for live profiles start with RP.

      Returns:
      - String

      Maps to Payflow Parameter: ORIGPROFILEID

    • setOrigProfileId

      public void setOrigProfileId(String origProfileId)
      Sets the origProfileId parameter.

      Required for Modify/Cancel/Inquiry/Retry action. Profile IDs for test profiles start with RT. Profile IDs for live profiles start with RP.

      Parameters:
      origProfileId - - String

      Maps to Payflow Parameter: ORIGPROFILEID

    • getPaymentHistory

      public String getPaymentHistory()
      Gets the paymentHistory parameter. Used for recurring inquiry.Allowed values are: Value Description Y - To view the full set of payment information for a profile, include the name/value pair with the Inquiry action. N - To view the status of a customer's profile, submit an Inquiry action that does not include the PAYMENTHISTORY parameter (alternatively, submit PAYMENTHISTORY=N).
      Returns:
      - String

      Maps to Payflow Parameter: PAYMENTHISTORY

    • setPaymentHistory

      public void setPaymentHistory(String paymentHistory)
      Sets the paymentHistory parameter. Used for recurring inquiry.Allowed values are: Value Description Y - To view the full set of payment information for a profile, include the name/value pair with the Inquiry action. N - To view the status of a customer's profile, submit an Inquiry action that does not include the PAYMENTHISTORY parameter (alternatively, submit PAYMENTHISTORY=N).
      Parameters:
      paymentHistory - - String

      Maps to Payflow Parameter: PAYMENTHISTORY

    • getPaymentNum

      public String getPaymentNum()
      Gets the paymentNum parameter.

      Payment number identifying the failed payment to be retried.

      Returns:
      - String

      Maps to Payflow Parameter: PAYMENTNUM

    • setPaymentNum

      public void setPaymentNum(String paymentNum)
      Sets the paymentNum parameter.

      Payment number identifying the failed payment to be retried.

      Parameters:
      paymentNum - - String

      Maps to Payflow Parameter: PAYMENTNUM

    • getFrequency

      public String getFrequency()
      Gets the frequency parameter.

      Number of days (frequency) between payment. Returned if PAYPERIOD=DAYS

      Returns:
      - String

      Maps to Payflow Parameter: FREQUENCY

    • setFrequency

      public void setFrequency(String frequency)
      Gets the frequency parameter.

      Number of days (frequency) between payment. Returned if PAYPERIOD=DAYS

      Parameters:
      frequency - - String

      Maps to Payflow Parameter: FREQUENCY

    • generateRequest

      protected void generateRequest()
    • getContext

      protected Context getContext()
    • setContext

      protected void setContext(Context context)
    • getRequestBuffer

      protected StringBuffer getRequestBuffer()
      Gets the Requestbuffer used for creating the actual request string.
      Returns:
      mRequestBuffer StringBuffer
    • setRequestBuffer

      protected void setRequestBuffer(StringBuffer value)
      sets the StringBuffer to hold the request string.
      Parameters:
      value - StringBuffer