Class Response


public final class Response extends BaseResponseDataObject

 Container class for response messages.
 This class enclosed response data objects specific to
 following:
 <ol>
 <li>Transaction response
 -- Response messages common to all transactions.</li>
 <li>Fraud response
 -- Fraud Filters response messages.</li>
 <li>Recurring response
 -- Recurring transaction response messages.</li>
 <li>Buyerauth response
 -- Buyer auth response messages. (Not supported.)</li>
 </ol>
 <p>Additionally the Response class also contains the
 transaction context, full request response string values.</p>
 {@link FraudResponse}
 {@link TransactionResponse}
 {@link RecurringResponse}
 {@link BuyerAuthResponse}
 {@link Context}

 Following example shows, how to obtain response
 of a transaction and how to use it.

  ..........
 // Trans is the transaction object.
 *		...................
 // 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.Result);
 System.out.println("RESPMSG = " + trxnResponse.RespMsg);
 }
  * <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());
 }
 }
  * <p>
 // Get the Context and check for any contained SDK specific errors.
 Context ctx = resp.getTransactionContext();
 if (ctx != null & ctx.getErrorCount() > 0)
 {
 System.out.println( "Errors = " + ctx());
 }
 
 
  • Constructor Details

    • Response

      public Response()
      Constructor
    • Response

      public Response(String RequestId, Context TrxContext)
      Constructor
      Parameters:
      RequestId - String
      TrxContext - String
  • Method Details

    • getFraudResponse

      public FraudResponse getFraudResponse()
      Gets the container object for all the fraud filters related response messages. FraudResponse
      Returns:
      - FraudResponse
    • getEcGetResponse

      public ECGetResponse getEcGetResponse()
      Gets the container object for all the express checkout related response messages for GET. ECGetResponse
      Returns:
      - ECGetResponse
    • getEcSetResponse

      public ExpressCheckoutResponse getEcSetResponse()
      Gets the container object for all the express checkout related response messages for SET. ExpressCheckoutResponse
      Returns:
      - ExpressCheckoutResponse
    • getEcUpdateResponse

      public ECUpdateResponse getEcUpdateResponse()
      Gets the container object for all the express checkout related response messages for SET. ExpressCheckoutResponse
      Returns:
      - ExpressCheckoutResponse
    • getBuyerAuthResponse

      public BuyerAuthResponse getBuyerAuthResponse()
      Gets the container object for all the buyer auth related response messages. BuyerAuthResponse
      Returns:
      - BuyerAuthResponse
    • getRecurringResponse

      public RecurringResponse getRecurringResponse()
      Gets the container object for all the recurring transaction related response messages. RecurringResponse
      Returns:
      - RecurringResponse
    • getEcDoResponse

      public ECDoResponse getEcDoResponse()
      Gets the container object for all the express checkout related response messages for DO. ECDoResponse
      Returns:
      - ECDoResponse
    • getTransactionResponse

      public TransactionResponse getTransactionResponse()
      Gets the container object for response messages common to all the transactions. TransactionResponse
      Returns:
      - TransactionResponse
    • getContext

      public Context getContext()
      Gets the transaction context populated with errors, if any. Context
      Returns:
      - Context
    • getExtDataList

      public ArrayList getExtDataList()
      Gets the The arraylist containing the extend data objects populated with the response messages.. ExtendData
      Returns:
      - ArrayList
    • getRequestString

      public String getRequestString()
      Gets the request string sent to the gateway.
      Returns:
      - String
    • getResponseString

      public String getResponseString()
      Gets the response string.
      Returns:
      - String
    • getRequestId

      public String getRequestId()
      Gets the request id sent to the gateway.
      Returns:
      - String
    • setRequestString

      protected void setRequestString(String RequestString)
    • setParams

      protected void setParams(String Response)
      Overrides:
      setParams in class BaseResponseDataObject
      Parameters:
      Response - String