net.authorize.aim
Class Transaction

java.lang.Object
  extended by net.authorize.Transaction
      extended by net.authorize.aim.Transaction
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Transaction

public class Transaction
extends Transaction
implements Serializable

Container to hold all payment related information that gets passed back and forth to the payment gateway.

See Also:
Serialized Form

Field Summary
protected  String MD5Value
           
protected  Map<String,String> merchantDefinedMap
           
protected  Map<String,String> requestMap
           
protected  TransactionType transactionType
           
 
Fields inherited from class net.authorize.Transaction
BRACKET_PIPE_DELIMITER, CURRENCY_DECIMAL_PLACES, EMPTY_STRING, ENCAP_CHAR_DELIMITER, FALSE, MAX_AUTH_CODE_LENGTH, QUANTITY_DECIMAL_PLACES, TRANSACTION_FIELD_DELIMITER, TRUE, VERSION, ZERO_AMOUNT, ZERO_STRING
 
Constructor Summary
protected Transaction(Merchant merchant, TransactionType transactionType, BigDecimal amount)
          Constructor for creation a transaction with typed objects.
 
Method Summary
static Transaction createTransaction(Merchant merchant, TransactionType transactionType, BigDecimal amount)
          Create a Transaction for a merchant.
static Transaction createTransaction(Transaction transaction, BasicXmlDocument response)
          Create a transaction from a response XML doc.
static Transaction createTransaction(Transaction transaction, Map<ResponseField,String> responseMap)
          Create a transaction from a responseMap.
 String getAuthorizationCode()
          Get the authorization code of the transaction.
 CreditCard getCreditCard()
          Get the CreditCard associated with the transaction.
 String getCurrencyCode()
          Get the currency code for Card Present transactions.
 BasicXmlDocument getCurrentResponse()
          Return a response XML doc if the transaction was a Card Present transaction.
 Customer getCustomer()
          Get the Customer information associated with the transaction.
 ECheck getECheck()
           
 EmailReceipt getEmailReceipt()
          Get the EmailReceipt associated with the transaction.
 String getMD5Value()
           
 String getMerchantDefinedField(String field)
          Get a merchant defined field.
 Map<String,String> getMerchantDefinedMap()
          Get the merchant defined data map.
 Order getOrder()
          Get the Order associated with the transaction.
 Map<String,String> getRequestMap()
           
 String getResponseField(ResponseField responseField)
          Returns the payment gateway response data for a specific ResponseField.
 Map<ResponseField,String> getResponseMap()
          Return the payment gateway response data map.
 ShippingAddress getShippingAddress()
          Get the ShippingAddress for the transaction request.
 ShippingCharges getShippingCharges()
          Get the ShippingCharges associated with the transaction.
 String getTransactionId()
          Return the payment gateway assigned transaction ID of the transaction.
 TransactionType getTransactionType()
          Get the transaction type.
 boolean isCardPresent()
          Return true if the transaction is a Card Present type transaction.
 void setAuthorizationCode(String authCode)
          The authorization code of an original transaction not captured on the payment gateway.
 void setCreditCard(CreditCard creditCard)
          Set the CreditCard information for the transaction request.
 void setCurrencyCode(String currencyCode)
          Set the currency code for Card Present transactions.
 void setCustomer(Customer customer)
          Set the Customer information for the transaction request.
 void setDuplicateWindow(int seconds)
          The window of time after the submission of a transaction that a duplicate transaction can not be submitted.
 void setECheck(ECheck eCheck)
           
 void setEmailReceipt(EmailReceipt emailReceipt)
          Set the EmailReceipt information for the transaction request.
 void setMerchantDefinedField(String field, String value)
          Set a merchant defined field.
 void setOrder(Order order)
          Set the Order (and OrderItems) for the transaction request.
 void setRecurringBilling(boolean recurringBillingStatus)
          Indicating marker used by merchant account providers to identify transactions which originate from merchant hosted recurring billing applications.
 void setShippingAddress(ShippingAddress shippingAddress)
          Set the ShippingAddress for the transaction request.
 void setShippingCharges(ShippingCharges shippingCharges)
          Set the ShippingCharges for the transaction request.
 void setSplitTenderId(String splitTenderId)
          The payment gateway assigned slit tender ID of an original transaction.
 void setTransactionId(String transactionId)
          The payment gateway assigned transaction ID of an original transaction.
 String toNVPString()
          Prepare the name/value pair mapping based on the Map(s) provided.
 
Methods inherited from class net.authorize.Transaction
getDecodedString, getEncodedString, setEncapCharDelimiter, setTransactionFieldDelimiter, toXMLString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requestMap

protected Map<String,String> requestMap

merchantDefinedMap

protected Map<String,String> merchantDefinedMap

transactionType

protected TransactionType transactionType

MD5Value

protected String MD5Value
Constructor Detail

Transaction

protected Transaction(Merchant merchant,
                      TransactionType transactionType,
                      BigDecimal amount)
Constructor for creation a transaction with typed objects.

Parameters:
merchant -
transactionType -
amount -
Method Detail

createTransaction

public static final Transaction createTransaction(Transaction transaction,
                                                  Map<ResponseField,String> responseMap)
Create a transaction from a responseMap.

Parameters:
transaction -
responseMap -
Returns:
a Transaction

createTransaction

public static final Transaction createTransaction(Transaction transaction,
                                                  BasicXmlDocument response)
Create a transaction from a response XML doc.

Parameters:
transaction -
response -
Returns:
Transaction object

createTransaction

public static Transaction createTransaction(Merchant merchant,
                                            TransactionType transactionType,
                                            BigDecimal amount)
Create a Transaction for a merchant.

Parameters:
merchant -
transactionType -
amount -

getRequestMap

public Map<String,String> getRequestMap()
Returns:
the transactionRequestHash

getResponseMap

public Map<ResponseField,String> getResponseMap()
Return the payment gateway response data map.

Returns:
a map of response data

setTransactionId

public void setTransactionId(String transactionId)
The payment gateway assigned transaction ID of an original transaction.

Parameters:
transactionId -

setSplitTenderId

public void setSplitTenderId(String splitTenderId)
The payment gateway assigned slit tender ID of an original transaction.

Parameters:
splitTenderId -

getTransactionId

public String getTransactionId()
Return the payment gateway assigned transaction ID of the transaction.

Returns:
The transaction id.

getTransactionType

public TransactionType getTransactionType()
Get the transaction type.

Returns:
the transactionType

setAuthorizationCode

public void setAuthorizationCode(String authCode)
The authorization code of an original transaction not captured on the payment gateway.

Parameters:
authCode -

getAuthorizationCode

public String getAuthorizationCode()
Get the authorization code of the transaction.

Returns:
authorizationCode

setCreditCard

public void setCreditCard(CreditCard creditCard)
Set the CreditCard information for the transaction request.

Parameters:
creditCard -

getCreditCard

public CreditCard getCreditCard()
Get the CreditCard associated with the transaction.

Returns:
credit card object

setECheck

public void setECheck(ECheck eCheck)
Parameters:
eCheck - the eCheck to set

getECheck

public ECheck getECheck()
Returns:
the eCheck

setCustomer

public void setCustomer(Customer customer)
Set the Customer information for the transaction request.

Parameters:
customer -

getCustomer

public Customer getCustomer()
Get the Customer information associated with the transaction.

Returns:
The Customer

setEmailReceipt

public void setEmailReceipt(EmailReceipt emailReceipt)
Set the EmailReceipt information for the transaction request.

Parameters:
emailReceipt -

getEmailReceipt

public EmailReceipt getEmailReceipt()
Get the EmailReceipt associated with the transaction.

Returns:
The EmailReceipt.

setOrder

public void setOrder(Order order)
Set the Order (and OrderItems) for the transaction request.

Parameters:
order -

getOrder

public Order getOrder()
Get the Order associated with the transaction.

Returns:
The Order.

setShippingAddress

public void setShippingAddress(ShippingAddress shippingAddress)
Set the ShippingAddress for the transaction request.

Parameters:
shippingAddress -

getShippingAddress

public ShippingAddress getShippingAddress()
Get the ShippingAddress for the transaction request.

Returns:
The ShippingAddress

setShippingCharges

public void setShippingCharges(ShippingCharges shippingCharges)
Set the ShippingCharges for the transaction request.

Parameters:
shippingCharges -

getShippingCharges

public ShippingCharges getShippingCharges()
Get the ShippingCharges associated with the transaction.

Returns:
The ShippingCharges

setDuplicateWindow

public void setDuplicateWindow(int seconds)
The window of time after the submission of a transaction that a duplicate transaction can not be submitted.

Parameters:
seconds -

setCurrencyCode

public void setCurrencyCode(String currencyCode)
Set the currency code for Card Present transactions.

Parameters:
currencyCode -

getCurrencyCode

public String getCurrencyCode()
Get the currency code for Card Present transactions.

Returns:
the currencyCode used in the transaction.

setRecurringBilling

public void setRecurringBilling(boolean recurringBillingStatus)
Indicating marker used by merchant account providers to identify transactions which originate from merchant hosted recurring billing applications. This value is not affiliated with Automated Recurring Billing.

Parameters:
recurringBillingStatus -

setMerchantDefinedField

public void setMerchantDefinedField(String field,
                                    String value)
Set a merchant defined field.

Parameters:
field -
value -

getMerchantDefinedField

public String getMerchantDefinedField(String field)
Get a merchant defined field.

Parameters:
field -
Returns:
Return the value found in the merchant defined hash by a field.

getMerchantDefinedMap

public Map<String,String> getMerchantDefinedMap()
Get the merchant defined data map.

Returns:
a map of merchant defined data

getResponseField

public String getResponseField(ResponseField responseField)
Returns the payment gateway response data for a specific ResponseField.

Parameters:
responseField -
Returns:
the value found in the map identified by the response field

toNVPString

public String toNVPString()
Prepare the name/value pair mapping based on the Map(s) provided.

Overrides:
toNVPString in class Transaction
Returns:
String

isCardPresent

public boolean isCardPresent()
Return true if the transaction is a Card Present type transaction.

Returns:
the cardPresent

getCurrentResponse

public BasicXmlDocument getCurrentResponse()
Return a response XML doc if the transaction was a Card Present transaction.

Returns:
the responseXml

getMD5Value

public String getMD5Value()
Returns:
the mD5Value


Copyright © 2014. All Rights Reserved.