Class RecurringCancelTransaction
This class is used to perform a recurring transaction with
Cancel action.
* <p>
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.
</p>
...............
// Populate data objects
...............
* <p>
//Set the Recurring related information.
RecurringInfo recurInfo = new RecurringInfo();
recurInfo.setOrigProfileId ("RT0000001350");
* <p>
// Create a new RecurringCancelTransaction
RecurringCancelTransaction trans = new RecurringCancelTransaction(
user, connection, recurInfo, PayflowUtility.getRequestId());
* <p>
// Submit the transaction.
Response resp = trans.submitTransaction();
* <p>
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());
}
* <p>
// 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());
}
-
Field Summary
Fields inherited from class paypal.payflow.BaseTransaction
requestId -
Constructor Summary
ConstructorsConstructorDescriptionRecurringCancelTransaction(UserInfo userInfo, PayflowConnectionData payflowConnectionData, RecurringInfo recurringInfo, String requestId) ConstructorRecurringCancelTransaction(UserInfo userInfo, RecurringInfo recurringInfo, String requestId) Constructor -
Method Summary
Methods inherited from class paypal.payflow.RecurringTransaction
generateRequestMethods inherited from class paypal.payflow.BaseTransaction
addHeader, clearExtendData, getBuyerAuthStatus, getClientInfo, getContext, getExtData, getRequest, getRequestBuffer, getRequestId, getResponse, getTender, getTrxType, getVerbosity, RemoveTransHeader, setBuyerAuthStatus, setClientInfo, setContext, setExtData, setRequestId, setTender, setVerbosity, submitTransaction
-
Constructor Details
-
RecurringCancelTransaction
public RecurringCancelTransaction(UserInfo userInfo, PayflowConnectionData payflowConnectionData, RecurringInfo recurringInfo, String requestId) Constructor- Parameters:
userInfo- UserInfo - User Info object populated with user credentials.payflowConnectionData- PayflowConnectionData - Connection credentials object.recurringInfo- RecurringInfo - Recurring Info object.requestId- String - Request Id *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.
............... // Populate data objects ............... *// Create a new RecurringCancelTransaction. RecurringCancelTransaction trans = new RecurringCancelTransaction(user, connection, recurInfo, payflowUtility.getRequestId ()); *
// Submit the transaction. Response resp = trans.submitTransaction();
-
RecurringCancelTransaction
Constructor- Parameters:
userInfo- UserInfo - User Info object populated with user credentials.recurringInfo- RecurringInfo - Recurring Info object.requestId- String - Request Id *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.
............... // Populate data objects ............... *// Create a new RecurringCancelTransaction. RecurringCancelTransaction trans = new RecurringCancelTransaction(user, recurInfo, payflowUtility.getRequestId ()); *
// Submit the transaction. Response resp = trans.submitTransaction();
-