# com.beasys.commerce.ebusiness.payment
TransactionResponse Class

public class TransactionResponse
extends `Object`
implements `Serializable`, `TransactionResponseConstants`

A `TransactionResponse` is returned by the business methods of the `CreditCardService`. It provides convenient access to the date, identifier, and status of the payment as well as a handle to the persistent `PaymentTransaction` associated with the transaction identifier. Additionally, it contains all service provider results in the form of a hash table of name value pairs.

Related Topics

``PaymentTransaction``

Hierarchy
  `Object`
  `TransactionResponse`

All Implemented Interfaces
  `Serializable`, `TransactionResponseConstants`

## Field Summary

`public `Handle`` | `paymentTransactionHandle` Handle to the `PaymentTransaction``` for which this response was generated.
`public `Price`` | `transactionAmount` The amount of the transaction associated with this response.
`public `Date`` | `transactionDate` The date of the transaction associated with this response.
`public `String`` | `transactionId` The unique identifier for the transaction associated with this response.
`public int` | `transactionStatus` The state of the transaction associated with this response.

## Constructor Summary

TransactionResponse() Default constructor.

## Method Summary

`public `Hashtable`` | `getAllResults`() Returns a hash table containing all service provider-specific results.
`public `Handle`` | `getPaymentTransactionHandle`() Get the value of paymentTransactionHandle
`public `String`` | `getStatusString`(int i) Converts a status code into a String representation.
`public `Price`` | `getTransactionAmount`() Get the value of transactionAmount
`public `Date`` | `getTransactionDate`() Get the value of transactionDate
`public `String`` | `getTransactionId`() Get the value of transactionId
`public `String`` | `getTransactionResult`(`String` hashKey) Get a value from results given the key
`public int` | `getTransactionStatus`() Get the value of transactionStatus
`public void` | `putTransactionResult`(`String` hashKey, `String` value) Set a value on results
`public void` | `setAllResults`(`Hashtable` newResults)
`public void` | `setPaymentTransactionHandle`(`Handle` paymentTransactionHandle) Set the value of paymentTransactionHandle
`public void` | `setTransactionAmount`(`Price` transactionAmount) Set the value of transactionAmount
`public void` | `setTransactionDate`(`Date` transactionDate) Set the value of transactionDate
`public void` | `setTransactionId`(`String` transactionId) Set the value of transactionId
`public void` | `setTransactionStatus`(int transactionStatus) Set the value of transactionStatus

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Detail

### paymentTransactionHandle

    public Handle paymentTransactionHandle

  Handle to the `PaymentTransaction``` for which this response was generated.

### transactionAmount

    public Price transactionAmount

  The amount of the transaction associated with this response.

### transactionDate

    public Date transactionDate

  The date of the transaction associated with this response.

### transactionId

    public String transactionId

  The unique identifier for the transaction associated with this response.

### transactionStatus

    public int transactionStatus

  The state of the transaction associated with this response.

## Constructor Detail

### TransactionResponse

    public TransactionResponse()

  Default constructor.

## Method Detail

### getAllResults() Method

    public Hashtable getAllResults()

Returns a hash table containing all service provider-specific results. This is used as a pass through so that clients can build neccessary provider specific logic.

#### Returns

All service-specific results.

### getPaymentTransactionHandle() Method

    public Handle getPaymentTransactionHandle()

Get the value of paymentTransactionHandle

#### Returns

paymentTransactionHandle.

### getStatusString(int) Method

    public String getStatusString(int i)

Converts a status code into a String representation.

#### Parameters

i
  The status code.

#### Returns

A String representation of the status code.

### getTransactionAmount() Method

    public Price getTransactionAmount()

Get the value of transactionAmount

#### Returns

transactionAmount.

### getTransactionDate() Method

    public Date getTransactionDate()

Get the value of transactionDate

#### Returns

transactionDate.

### getTransactionId() Method

    public String getTransactionId()

Get the value of transactionId

#### Returns

transactionId.

### getTransactionResult(String) Method

    public String getTransactionResult(String hashKey)

Get a value from results given the key

#### Returns

String

### getTransactionStatus() Method

    public int getTransactionStatus()

Get the value of transactionStatus

#### Returns

transactionStatus.

### putTransactionResult(String, String) Method

    public void putTransactionResult(String hashKey,
                                     String value)

Set a value on results

#### Parameters

hashKey
  hashKey to be added to results

value
  value to be added to results

### setAllResults(Hashtable) Method

    public void setAllResults(Hashtable newResults)

### setPaymentTransactionHandle(Handle) Method

    public void setPaymentTransactionHandle(Handle paymentTransactionHandle)

Set the value of paymentTransactionHandle

#### Parameters

paymentTransactionHandle
  paymentTransactionHandle to be added

### setTransactionAmount(Price) Method

    public void setTransactionAmount(Price transactionAmount)

Set the value of transactionAmount

#### Parameters

transactionAmount
  transactionAmount to be added

### setTransactionDate(Date) Method

    public void setTransactionDate(Date transactionDate)

Set the value of transactionDate

#### Parameters

transactionDate
  transactionDate to be added

### setTransactionId(String) Method

    public void setTransactionId(String transactionId)

Set the value of transactionId

#### Parameters

transactionId
  transactionId to be added

### setTransactionStatus(int) Method

    public void setTransactionStatus(int transactionStatus)

Set the value of transactionStatus

#### Parameters

transactionStatus
  transactionStatus to be added