Class RecurringPaymentTransaction


public class RecurringPaymentTransaction extends RecurringTransaction

 This class is used to perform a recurring transaction with
 Payment action.

 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.
 </p>

 ...............
 // Populate data objects
 ...............

 //Set the Recurring related information.
 RecurringInfo recurInfo = new RecurringInfo();
 recurInfo.setOrigProfileId ("RT0000001350");
 // The date that the first payment will be processed.
 // This will be of the format mmddyyyy.

 RecurInfo.setPaymentNum ("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 Double(25.12));
 inv.setAmt (amt);
 inv.setPoNum ("PO12345");
 inv.setInvNum ("INV12345");

 // Set the Billing Address details.
 BillTo bill = new BillTo();
 bill.setBillToStreet ("123 Main St.");
 bill.setBillToZip ("12345");
 inv.setBillTo (bill);

 // Create a new RecurringPaymentTransaction.
 RecurringPaymentTransaction trans = new RecurringPaymentTransaction(
 user, connection, recurInfo, inv, PayflowUtility.getRequestId());

 // Submit the transaction.
 Response resp = trans.submitTransaction();

 if (Resp != null)
 {
 // Get the Transaction Response parameters.
 TransactionResponse trxnResponse =  resp.getTransactionResponse();
 if (trxnResponse != null)
 {
 System.out.println("RESULT = " + trxnResponse.getResult());
 System.out.println("RESPMSG = " + trxnResponse.getRespMsg());
 }

 // Get the Recurring Response parameters.
 RecurringResponse recurResponse = resp.getRecurringResponse();
 if (recurResponse != null)
 {
 System.out.println("RPREF = " + recurResponse.getRPRef());
 System.out.println("PROFILEID = " + recurResponse.getProfileId());
 }
 }
 // Get the Context and check for any contained SDK specific errors.
 Context ctx = resp.getTransactionContext();
 if (ctx != null & ctx.getErrorCount() > 0)
 {
 System.out.println("/n" + "Errors = " + Ctx.ToString());
 }
 
 
  • Constructor Details

    • RecurringPaymentTransaction

      public RecurringPaymentTransaction(UserInfo userInfo, PayflowConnectionData payflowConnectionData, RecurringInfo recurringInfo, Invoice invoice, String requestId)
      Constructor
      Parameters:
      userInfo - - User Info object populated with user credentials.
      payflowConnectionData - - Connection credentials object.
      recurringInfo - - Recurring Info object.
      invoice - - Invoice object.
      requestId - - Request Id *

      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.

      ............... // Populate data objects ............... *

      // Create a new RecurringPaymentTransaction. RecurringPaymentTransaction trans = new RecurringPaymentTransaction(user, connection, recurInfo, inv payflowUtility.getRequestId ()); *

      // Submit the transaction. Response resp = trans.submitTransaction();

    • RecurringPaymentTransaction

      public RecurringPaymentTransaction(UserInfo userInfo, RecurringInfo recurringInfo, Invoice invoice, String requestId)
      Constructor
      Parameters:
      userInfo - - User Info object populated with user credentials.
      recurringInfo - - Recurring Info object.
      invoice - - Invoice object.
      requestId - - Request Id *

      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.

      ............... // Populate data objects ............... *

      // Create a new RecurringPaymentTransaction. RecurringPaymentTransaction trans = new RecurringPaymentTransaction(user, recurInfo, inv payflowUtility.getRequestId ()); *

      // Submit the transaction. Response resp = trans.submitTransaction();