Class OrderTransaction
An Order transaction represents an agreement to pay one or more authorized amounts up to the specified total over a maximum of 29 days. *
This example shows how to create and perform a order transaction as part of Express Checkout. *
.......... .......... //Populate required data objects. .......... .......... *
// Create a new Order Transaction. OrderTransaction Trans = new OrderTransaction( userInfo, PayflowConnectionData, Invoice, Tender, RequestId); //Submit the transaction. trans.submitTransaction(); *
// Get the Response. Response resp = trans.getResponse(); if (Resp != null) { // Get the Transaction Response parameters. TransactionResponse trxnResponse = resp.transactionResponse(); // Display the transaction response parameters. 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()); System.out.println("TOKEN = " + Trans.getResponse().getEcSetResponse().getToken()); System.out.println("CORRELATIONID = " + TrxnResponse.getCorrelationId()); // If value is true, then the Request ID has not been changed and the original response // of the original transction is returned. System.out.println("DUPLICATE = " + TrxnResponse.getDuplicate()); } // 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
Fields inherited from class paypal.payflow.BaseTransaction
requestId -
Constructor Summary
ConstructorsConstructorDescriptionOrderTransaction(UserInfo userInfo, Invoice invoice, PayPalTender tender, String requestId) Constructor.OrderTransaction(UserInfo userInfo, PayflowConnectionData payflowConnectionData, Invoice invoice, PayPalTender tender, String requestId) Constructor. -
Method Summary
Methods inherited from class paypal.payflow.AuthorizationTransaction
generateRequest, getCreateSecureToken, getOrigId, getPartialAuth, getSecureTokenId, setCreateSecureToken, setOrigId, setPartialAuth, setSecureTokenIdMethods 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
-
OrderTransaction
public OrderTransaction(UserInfo userInfo, PayflowConnectionData payflowConnectionData, Invoice invoice, PayPalTender tender, String requestId) Constructor.- Parameters:
userInfo- User Info object populated with user credentials.payflowConnectionData- Connection object.invoice- Invoice object.tender- Tender objectrequestId- String Request Id This example shows how to create and perform a authorization transaction. *.......... .......... //Populate required data objects. .......... .......... *
// Create a new Order Transaction. OrderTransaction Trans = new OrderTransaction( userInfo, PayflowConnectionData, Invoice, Tender, RequestId); //Submit the transaction. trans.submitTransaction(); *
// Get the Response. Response resp = trans.getResponse(); if (Resp != null) { // Get the Transaction Response parameters. TransactionResponse trxnResponse = resp.transactionResponse(); // Display the transaction response parameters. 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()); System.out.println("TOKEN = " + Trans.getResponse().getEcSetResponse().getToken()); System.out.println("CORRELATIONID = " + TrxnResponse.getCorrelationId()); // If value is true, then the Request ID has not been changed and the original response // of the original transction is returned. System.out.println("DUPLICATE = " + TrxnResponse.getDuplicate()); } // 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()); }
-
OrderTransaction
Constructor.- Parameters:
userInfo- User Info object populated with user credentials.invoice- Invoice object.tender- Tender objectrequestId- String Request Id This example shows how to create and perform a authorization transaction. *.......... .......... //Populate required data objects. .......... .......... *
// Create a new Order Transaction. OrderTransaction Trans = new OrderTransaction( userInfo, Invoice, Tender, RequestId); //Submit the transaction. trans.submitTransaction(); *
// Get the Response. Response resp = trans.getResponse(); if (Resp != null) { // Get the Transaction Response parameters. TransactionResponse trxnResponse = resp.transactionResponse(); // Display the transaction response parameters. 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()); System.out.println("TOKEN = " + Trans.getResponse().getEcSetResponse().getToken()); System.out.println("CORRELATIONID = " + TrxnResponse.getCorrelationId()); // If value is true, then the Request ID has not been changed and the original response // of the original transction is returned. System.out.println("DUPLICATE = " + TrxnResponse.getDuplicate()); } // 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()); }
-