net.authorize.sim
Class Transaction

java.lang.Object
  extended by net.authorize.Transaction
      extended by net.authorize.aim.Transaction
          extended by net.authorize.sim.Transaction
All Implemented Interfaces:
Serializable

public class Transaction
extends Transaction

See Also:
Serialized Form

Field Summary
static int MAX_RECEIPT_LINK_TEXT_LENGTH
           
static String PAYMENT_FORM
           
 
Fields inherited from class net.authorize.aim.Transaction
MD5Value, merchantDefinedMap, requestMap, 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.
 
Method Summary
 void addFieldToRename(String fieldToRename, String replacementName)
          Add a field to rename.
 void addFormInput(String inputName, String htmlInputData)
          Add an input name and replacement data to the list of fields that should not be auto populated in the createForm method.
 String createForm(String formName, String formId, Button button)
          Return an HTML form with all inputs.
static String createRelayResponseRedirectUrl(String relayResponseUrl, Map<String,String[]> requestParameterMap)
          Build a relay response url for the relay response redirect.
static Transaction createTransaction(Merchant merchant, TransactionType transactionType, long fingerPrintSequence, BigDecimal amount)
          Create a Transaction for a given merchant.
 Environment getEnvironment()
           
 Map<String,String> getFieldsToRename()
           
 Fingerprint getFingerprint()
           
 Map<String,String> getFormInputs()
          Get the field names that should not be auto populated in the createForm method.
 HostedPaymentFormSettings getHostedPaymentFormSettings()
           
 HostedReceiptPageSettings getHostedReceiptPageSettings()
           
 String getRelayResponseUrl()
          SIM applications use relay response.
 boolean isShowPaymentForm()
          Returns true if the payment data collection form should be displayed/used.
 void setFieldsToRename(Map<String,String> fieldsToRename)
           
 void setFormInputs(LinkedHashMap<String,String> formInputs)
           
 void setHostedPaymentFormSettings(HostedPaymentFormSettings hostedPaymentFormSettings)
           
 void setHostedReceiptPageSettings(HostedReceiptPageSettings hostedReceiptPageSettings)
           
 void setRelayResponseUrl(String relayResponseUrl)
          SIM applications use relay response to redirect the user back to the merchant server.
 void setShowPaymentForm(boolean showForm)
          If true, will populate a field that indicates that the merchant would like to use the payment gateway hosted payment form to collect payment data.
 
Methods inherited from class net.authorize.aim.Transaction
createTransaction, createTransaction, createTransaction, getAuthorizationCode, getCreditCard, getCurrencyCode, getCurrentResponse, getCustomer, getECheck, getEmailReceipt, getMD5Value, getMerchantDefinedField, getMerchantDefinedMap, getOrder, getRequestMap, getResponseField, getResponseMap, getShippingAddress, getShippingCharges, getTransactionId, getTransactionType, isCardPresent, setAuthorizationCode, setCreditCard, setCurrencyCode, setCustomer, setDuplicateWindow, setECheck, setEmailReceipt, setMerchantDefinedField, setOrder, setRecurringBilling, setShippingAddress, setShippingCharges, setSplitTenderId, setTransactionId, toNVPString
 
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

MAX_RECEIPT_LINK_TEXT_LENGTH

public static final int MAX_RECEIPT_LINK_TEXT_LENGTH
See Also:
Constant Field Values

PAYMENT_FORM

public static final String PAYMENT_FORM
See Also:
Constant Field Values
Constructor Detail

Transaction

protected Transaction(Merchant merchant,
                      TransactionType transactionType,
                      BigDecimal amount)
Constructor.

Parameters:
merchant -
transactionType -
amount -
Method Detail

createTransaction

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

Parameters:
merchant -
transactionType -
fingerPrintSequence -
amount -
Returns:
a Transaction

getFingerprint

public Fingerprint getFingerprint()
Returns:
the fingerprint

getEnvironment

public Environment getEnvironment()
Returns:
the environment

setShowPaymentForm

public void setShowPaymentForm(boolean showForm)
If true, will populate a field that indicates that the merchant would like to use the payment gateway hosted payment form to collect payment data.

Parameters:
showForm -

isShowPaymentForm

public boolean isShowPaymentForm()
Returns true if the payment data collection form should be displayed/used.

Returns:
boolean

getFormInputs

public Map<String,String> getFormInputs()
Get the field names that should not be auto populated in the createForm method. The developer can then offer these as customized input fields in the form.

Returns:
the fieldsToRemoveFromForm

addFormInput

public void addFormInput(String inputName,
                         String htmlInputData)
Add an input name and replacement data to the list of fields that should not be auto populated in the createForm method. If the optionsMap is empty, then no input element will be created in the form for the specified inputName. Example: If "notes" was passed in as the inputName, the htmlInputData provided could look like
 <label>Notes</label>
   <input type='text' class='text' name='notes' size='45'></input>
 
 

Parameters:
inputName -
htmlInputData -

setFormInputs

public void setFormInputs(LinkedHashMap<String,String> formInputs)
Parameters:
formInputs - the form input names and input options that should not be auto populated in the createForm method.

getHostedPaymentFormSettings

public HostedPaymentFormSettings getHostedPaymentFormSettings()
Returns:
the hostedPaymentFormSettings

setHostedPaymentFormSettings

public void setHostedPaymentFormSettings(HostedPaymentFormSettings hostedPaymentFormSettings)
Parameters:
hostedPaymentFormSettings - the hostedPaymentFormSettings to set

getFieldsToRename

public Map<String,String> getFieldsToRename()
Returns:
the fieldsToRename

setFieldsToRename

public void setFieldsToRename(Map<String,String> fieldsToRename)
Parameters:
fieldsToRename - the fieldsToRename to set

addFieldToRename

public void addFieldToRename(String fieldToRename,
                             String replacementName)
Add a field to rename.

Parameters:
fieldToRename -
replacementName -

getHostedReceiptPageSettings

public HostedReceiptPageSettings getHostedReceiptPageSettings()
Returns:
the hostedReceiptPageSettings

setHostedReceiptPageSettings

public void setHostedReceiptPageSettings(HostedReceiptPageSettings hostedReceiptPageSettings)
Parameters:
hostedReceiptPageSettings - the hostedReceiptPageSettings to set

setRelayResponseUrl

public void setRelayResponseUrl(String relayResponseUrl)
SIM applications use relay response to redirect the user back to the merchant server.

Parameters:
relayResponseUrl -

getRelayResponseUrl

public String getRelayResponseUrl()
SIM applications use relay response. Set this to false (default) if you are using AIM.

Returns:
the relayResponseUrl

createForm

public String createForm(String formName,
                         String formId,
                         Button button)
Return an HTML form with all inputs. All the data collected in the Transaction will be added as inputs.

Returns:
A string containing the html FORM

createRelayResponseRedirectUrl

public static String createRelayResponseRedirectUrl(String relayResponseUrl,
                                                    Map<String,String[]> requestParameterMap)
Build a relay response url for the relay response redirect.

Parameters:
relayResponseUrl -
requestParameterMap -
Returns:
a string that is the relay response redirect url


Copyright © 2014. All Rights Reserved.