Class RecurringInfo
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected ContextGets the frequency parameter.longGets the maxFailPayments parameter.Gets the optionalTrx parameter.Gets the optionalTrxAmt parameter.Gets the origProfileId parameter.Gets the paymentHistory parameter.Gets the paymentNum parameter.Gets the payPeriod parameter.Gets the profileName parameter.protected StringBufferGets the Requestbuffer used for creating the actual request string.longGets the retryNumDays parameter.getStart()Gets the start parameter.longgetTerm()Gets the term parameter.protected voidsetContext(Context context) voidsetFrequency(String frequency) Gets the frequency parameter.voidsetMaxFailPayments(long maxFailPayments) Sets the maxFailPayments parameter.voidsetOptionalTrx(String optionalTrx) Sets the optionalTrx parameter.voidsetOptionalTrxAmt(Currency optionalTrxAmt) Sets the optionalTrxAmt parameter.voidsetOrigProfileId(String origProfileId) Sets the origProfileId parameter.voidsetPaymentHistory(String paymentHistory) Sets the paymentHistory parameter.voidsetPaymentNum(String paymentNum) Sets the paymentNum parameter.voidsetPayPeriod(String payPeriod) Sets the payPeriod parameter.voidsetProfileName(String profileName) Sets the profileName parameter.protected voidsetRequestBuffer(StringBuffer value) sets the StringBuffer to hold the request string.voidsetRetryNumDays(long retryNumDays) Sets the retryNumDays parameter.voidSets the start parameter.voidsetTerm(long term) Sets the term parameter.
-
Constructor Details
-
RecurringInfo
public RecurringInfo()constructor
-
-
Method Details
-
getProfileName
Gets the profileName parameter.- Returns:
- - String
Maps to Payflow Parameter: PROFILENAME
-
setProfileName
Sets the profileName parameter.- Parameters:
profileName- - StringMaps to Payflow Parameter: PROFILENAME
-
getStart
Gets the start parameter.Beginning date for the recurring billing cycle.
- Returns:
- - String
Maps to Payflow Parameter: START
-
setStart
Sets the start parameter.Beginning date for the recurring billing cycle.
- Parameters:
start- - StringMaps 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- - StringMaps to Payflow Parameter: TERM
-
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
Sets the payPeriod parameter.Specifies how often the payment occurs.
- Parameters:
payPeriod- - StringValue - 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
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
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- - StringMaps to Payflow Parameter: OPTIONALTRX
-
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
Sets the optionalTrxAmt parameter.Amount of the Optional Transaction. Required only when OPTIONALTRX=S. Optional when OPTIONALTRX=A ($1 Authorization by default)
- Parameters:
optionalTrxAmt- - StringMaps 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- - StringMaps 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- - StringMaps to Payflow Parameter: MAXFAILPAYMENTS
-
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
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- - StringMaps to Payflow Parameter: ORIGPROFILEID
-
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
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- - StringMaps to Payflow Parameter: PAYMENTHISTORY
-
getPaymentNum
Gets the paymentNum parameter.Payment number identifying the failed payment to be retried.
- Returns:
- - String
Maps to Payflow Parameter: PAYMENTNUM
-
setPaymentNum
Sets the paymentNum parameter.Payment number identifying the failed payment to be retried.
- Parameters:
paymentNum- - StringMaps to Payflow Parameter: PAYMENTNUM
-
getFrequency
Gets the frequency parameter.Number of days (frequency) between payment. Returned if
PAYPERIOD=DAYS- Returns:
- - String
Maps to Payflow Parameter: FREQUENCY
-
setFrequency
Gets the frequency parameter.Number of days (frequency) between payment. Returned if
PAYPERIOD=DAYS- Parameters:
frequency- - StringMaps to Payflow Parameter: FREQUENCY
-
generateRequest
protected void generateRequest() -
getContext
-
setContext
-
getRequestBuffer
Gets the Requestbuffer used for creating the actual request string.- Returns:
- mRequestBuffer StringBuffer
-
setRequestBuffer
sets the StringBuffer to hold the request string.- Parameters:
value- StringBuffer
-