Class CaptureTransaction
Capture transaction needs to be performed on a successful authorization transaction in order to capture the amount. Therefore, a capture transaction always takes the PNRef of a authorization transaction.
............... // Populate data objects ............... *// Create a new Capture Transaction. CaptureTransaction trans = new CaptureTransaction("PNRef of Authorization transaction", User, Connection, PayflowUtility.getrequestId(); *
// Submit the transaction. Response resp = trans.SubmitTransaction(); *
if (Resp != null) { TransactionResponse trxnResponse = resp.getTransactionResponse(); if (TrxnResponse != null) { System.out.println("RESULT = " + trxnResponse.getResult()); System.out.println("PNREF = " + trxnResponse.getPnref()); System.out.println("RESPMSG = " + trxnResponse.getRespMsg()); System.out.println("AUTHCODE = " + trxnResponse.getAuthCode()); System.out.println("AVSADDR = " + trxnResponse.getAVSAddr()); System.out.println("AVSZIP = " + trxnResponse.getAVSZip()); } } *
// Get the Context and check for any contained SDK specific errors. Context ctx = resp.getTransactionContext(); if (ctx != null && ctx.getErrorCount() %3E 0) { System.out.println( "Errors = " + ctx.ToString()); }
-
Field Summary
FieldsFields inherited from class paypal.payflow.BaseTransaction
requestId -
Constructor Summary
ConstructorsConstructorDescriptionCaptureTransaction(String origId, UserInfo userInfo, String requestId) CaptureTransaction(String origId, UserInfo userInfo, Invoice invoice, String requestId) CaptureTransaction(String origId, UserInfo userInfo, Invoice invoice, BaseTender tender, String requestId) CaptureTransaction(String origId, UserInfo userInfo, PayflowConnectionData payflowConnectionData, String requestId) CaptureTransaction(String origId, UserInfo userInfo, PayflowConnectionData payflowConnectionData, Invoice Invoice, String requestId) CaptureTransaction(String origId, UserInfo userInfo, PayflowConnectionData PayflowConnectionData, Invoice invoice, BaseTender tender, String requestId) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGenerates the transaction request.Gets the captureComplete for a capture.voidsetcaptureComplete(String captureComplete) Indicates if this Delayed Capture transaction is the last capture you intend to make.Methods inherited from class paypal.payflow.ReferenceTransaction
getOrigPPRef, setOrigPPRefMethods 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
-
Field Details
-
captureComplete
Complete type for a capture. Y or N.
-
-
Constructor Details
-
CaptureTransaction
public CaptureTransaction(String origId, UserInfo userInfo, PayflowConnectionData payflowConnectionData, Invoice Invoice, String requestId) - Parameters:
origId- String Original Transaction IduserInfo- UserInfo object populated with user credentials.payflowConnectionData- PayflowConnectionData Connection credentials object.Invoice- Invoice object.requestId- Request Id.Capture transaction needs to be performed on a successful authorization transaction in order to capture the amount. Therefore, a capture transaction always takes the PNRef of a authorization transaction.
*............... // Populate data objects ............... *
// Create a new Capture Transaction. CaptureTransaction trans = new CaptureTransaction("PNRef of Authorization transaction", User, Connection, Inv, PayflowUtility.requestId); *
// Submit the transaction. Response resp = trans.SubmitTransaction(); *
if (resp != null) { TransactionResponse trxnResponse = resp.getTransactionResponse(); if (trxnResponse != null) { System.out.println("RESULT = " + trxnResponse.getResult()); System.out.println("PNREF = " + trxnResponse.getPnref()); System.out.println("RESPMSG = " + trxnResponse.getRespMsg()); System.out.println("AUTHCODE = " + trxnResponse.getAuthCode()); System.out.println("AVSADDR = " + trxnResponse.getAVSAddr()); System.out.println("AVSZIP = " + trxnResponse.getAVSZip()); } } *
Get the Context and check for any contained SDK specific errors. Context ctx = resp.getTransactionContext(); if (ctx != null && ctx.getErrorCount() %3E 0) { System.out.println("Errors = " + ctx.ToString()); }
-
CaptureTransaction
- Parameters:
origId- Original Transaction Id.userInfo- UserInfo object populated with user credentials.invoice- Invoice object.requestId- Request Id.Capture transaction needs to be performed on a successful authorization transaction in order to capture the amount. Therefore, a capture transaction always takes the PNRef of a authorization transaction.
............... // Populate data objects ............... *// Create a new Capture Transaction. CaptureTransaction Trans = new CaptureTransaction("PNRef of Authorization transaction", User, Inv, PayflowUtility.requestId); *
// Submit the transaction. Response resp = trans.submitTransaction(); *
if (resp != null) { TransactionResponse trxnResponse = Resp.TransactionResponse; if (trxnResponse != null) { System.out.println("RESULT = " + trxnResponse.getResult()); System.out.println("PNREF = " + trxnResponse.getPnref()); System.out.println("RESPMSG = " + trxnResponse.getRespMsg()); System.out.println("AUTHCODE = " + trxnResponse.getAuthCode()); System.out.println("AVSADDR = " + trxnResponse.getAVSAddr()); System.out.println("AVSZIP = " + trxnResponse.getAVSZip()); } } *
// Get the Context and check for any contained SDK specific errors. Context ctx = resp.getTransactionContext(); if (ctx != null && ctx.getErrorCount() %3E 0) { System.out.println("Errors = " + Ctx.ToString()); }
-
CaptureTransaction
public CaptureTransaction(String origId, UserInfo userInfo, PayflowConnectionData PayflowConnectionData, Invoice invoice, BaseTender tender, String requestId) - Parameters:
origId- Original Transaction Id.userInfo- User Info object populated with user credentials.PayflowConnectionData- Connection credentials object.invoice- Invoice object.tender- BaseTender object.requestId- Request Id.Capture transaction needs to be performed on a successful authorization transaction in order to capture the amount. Therefore, a capture transaction always takes the PNRef of a authorization transaction.
............... // Populate data objects ............... *// Create a new Capture Transaction. CaptureTransaction trans = new CaptureTransaction("PNRef of Authorization transaction", User, Connection, Inv, tender, PayflowUtility.requestId); *
// Submit the transaction. Response Resp = Trans.submitTransaction(); *
if (resp != null) { TransactionResponse trxnResponse = resp.getTransactionResponse(); if (trxnResponse != null) { System.out.println("RESULT = " + trxnResponse.getResult()); System.out.println("PNREF = " + trxnResponse.getPnref()); System.out.println("RESPMSG = " + trxnResponse.getRespMsg()); System.out.println("AUTHCODE = " + trxnResponse.getAuthCode()); System.out.println("AVSADDR = " + trxnResponse.getAVSAddr()); System.out.println("AVSZIP = " + trxnResponse.getAVSZip()); } } *
// Get the Context and check for any contained SDK specific errors. Context ctx = resp.getTransactionContext(); if (ctx != null && ctx.getErrorCount() %3E 0) { System.out.println("Errors = " + ctx.ToString()); }
-
CaptureTransaction
public CaptureTransaction(String origId, UserInfo userInfo, Invoice invoice, BaseTender tender, String requestId) - Parameters:
origId- Original Transaction Id.userInfo- User Info object populated with user credentials.invoice- Invoice object.tender- BaseTender object.requestId- Request Id.Capture transaction needs to be performed on a successful authorization transaction in order to capture the amount. Therefore, a capture transaction always takes the PNRef of a authorization transaction.
............... // Populate data objects ............... *// Create a new Capture Transaction. CaptureTransaction trans = new CaptureTransaction("PNRef of Authorization transaction", User, Inv, tender, PayflowUtility.requestId); *
// Submit the transaction. Response resp = trans.submitTransaction(); *
if (Resp != null) { TransactionResponse trxnResponse = resp.getTransactionResponse; if (trxnResponse != null) { System.out.println("RESULT = " + trxnResponse.getResult()); System.out.println("PNREF = " + trxnResponse.getPnref()); System.out.println("RESPMSG = " + trxnResponse.getRespMsg()); System.out.println("AUTHCODE = " + trxnResponse.getAuthCode()); System.out.println("AVSADDR = " + trxnResponse.getAVSAddr()); System.out.println("AVSZIP = " + trxnResponse.getAVSZip()); } } *
// Get the Context and check for any contained SDK specific errors. Context ctx = resp.getTransactionContext(); if (ctx != null && ctx.getErrorCount() %3E 0) { System.out.println("Errors = " + ctx.toString()); }
-
CaptureTransaction
public CaptureTransaction(String origId, UserInfo userInfo, PayflowConnectionData payflowConnectionData, String requestId) - Parameters:
origId- Original Transaction Id.userInfo- User Info object populated with user credentials.payflowConnectionData- Connection credentials object.requestId- Request Id.Capture transaction needs to be performed on a successful authorization transaction in order to capture the amount. Therefore, a capture transaction always takes the PNRef of a authorization transaction.
............... // Populate data objects ............... *// Create a new Capture Transaction. CaptureTransaction trans = new CaptureTransaction("PNRef of Authorization transaction", User, Connection, PayflowUtility.getrequestId()); *
// Submit the transaction. Response resp = trans.submitTransaction(); *
if (Resp != null) { TransactionResponse trxnResponse = resp.getTransactionResponse(); if (TrxnResponse != null) { System.out.println("RESULT = " + trxnResponse.getResult()); System.out.println("PNREF = " + trxnResponse.getPnref()); System.out.println("RESPMSG = " + trxnResponse.getRespMsg()); System.out.println("AUTHCODE = " + trxnResponse.getAuthCode()); System.out.println("AVSADDR = " + trxnResponse.getAVSAddr()); System.out.println("AVSZIP = " + trxnResponse.getAVSZip()); } } *
// Get the Context and check for any contained SDK specific errors. Context ctx = resp.getTransactionContext(); if (ctx != null && ctx.getErrorCount() %3E 0) { System.out.println("Errors = " + ctx.ToString()); }
-
CaptureTransaction
- Parameters:
origId- Original Transaction Id.userInfo- UserInfo object populated with user credentials.requestId- Request Id.Capture transaction needs to be performed on a successful authorization transaction in order to capture the amount. Therefore, a capture transaction always takes the PNRef of a authorization transaction.
............... // Populate data objects ............... *// Create a new Capture Transaction. CaptureTransaction trans = new CaptureTransaction("PNRef of Authorization transaction", User, Connection, PayflowUtility.getrequestId()); *
// Submit the transaction. Response Resp = trans.submitTransaction(); *
if (Resp != null) { TransactionResponse trxnResponse = resp.getTransactionResponse(); if (trxnResponse != null) { System.out.println("RESULT = " + trxnResponse.getResult()); System.out.println("PNREF = " + trxnResponse.getPnref()); System.out.println("RESPMSG = " + trxnResponse.getRespMsg()); System.out.println("AUTHCODE = " + trxnResponse.getAuthCode()); System.out.println("AVSADDR = " + trxnResponse.getAVSAddr()); System.out.println("AVSZIP = " + trxnResponse.getAVSZip()); } } *
// Get the Context and check for any contained SDK specific errors. Context ctx = Resp.getTransactionContext(); if (ctx != null && ctx.getErrorCount() %3E 0) { System.out.println(Environment.NewLine + "Errors = " + ctx.toString()); }
-
-
Method Details
-
getcaptureComplete
Gets the captureComplete for a capture. Possible values can be Y/N.- Returns:
- captureComplete String
Maps to Payflow Parameter: CAPTURECOMPLETE
-
setcaptureComplete
Indicates if this Delayed Capture transaction is the last capture you intend to make. The values are: Y (default) / N NOTE: If CAPTURECOMPLETE is Y, any remaining amount of the original reauthorized transaction is automatically voided.- Parameters:
captureComplete- StringMaps to Payflow Parameter: CAPTURECOMPLETE
-
generateRequest
protected void generateRequest()Description copied from class:BaseTransactionGenerates the transaction request.- Overrides:
generateRequestin classReferenceTransaction
-