net.authorize
Enum Environment

java.lang.Object
  extended by java.lang.Enum<Environment>
      extended by net.authorize.Environment
All Implemented Interfaces:
Serializable, Comparable<Environment>

public enum Environment
extends Enum<Environment>

Determines which environment to post transactions against. By placing the merchant's payment gateway account in Test Mode in the Merchant Interface. New payment gateway accounts are placed in Test Mode by default. For more information about Test Mode, see the Merchant Integration Guide at http://www.authorize.net/support/merchant/. When processing test transactions in Test Mode, the payment gateway will return a transaction ID of "0." This means you cannot test follow-on transactions, for example, credits, voids, etc., while in Test Mode. To test follow-on transactions, you can either submit x_test_request=TRUE as indicated above, or process a test transaction with any valid credit card number in live mode, as explained below. Note: Transactions posted against live merchant accounts using either of the above testing methods are not submitted to financial institutions for authorization and are not stored in the Merchant Interface. If testing in the live environment is successful, you are ready to submit live transactions and verify that they are being submitted successfully. Either remove the x_test_request field from the transaction request string, or set it to "FALSE;" or, if you are using Test Mode, turn it off in the Merchant Interface. To receive a true response, you must submit a transaction using a real credit card number. You can use any valid credit card number to submit a test transaction. You can void successful transactions immediately to prevent live test transactions from being processed. This can be done quickly on the Unsettled Transactions page of the Merchant Interface. It is recommended that when testing using a live credit card, you use a nominal value, such as $0.01. That way, if you forget to void the transaction, the impact will be minimal. For VISA verification transactions, submit a $0.00 value instead, if the processor accepts it.


Enum Constant Summary
CUSTOM
           
PRODUCTION
           
PRODUCTION_TESTMODE
           
SANDBOX
           
SANDBOX_TESTMODE
           
 
Method Summary
static Environment createEnvironment(String baseUrl, String xmlBaseUrl)
          If a custom environment needs to be supported, this convenience create method can be used to pass in a custom baseUrl.
static Environment createEnvironment(String baseUrl, String xmlBaseUrl, String cardPresentUrl)
          If a custom environment needs to be supported, this convenience create method can be used to pass in a custom baseUrl.
 String getBaseUrl()
           
static boolean getBooleanProperty(String propertyName)
          Reads a boolean value from property file and/or the environment Values in property file supersede the values set in environment
 String getCardPresentUrl()
           
static int getIntProperty(String propertyName)
          Reads a integer value from property file and/or the environment Values in property file supersede the values set in environment
static String getProperty(String propertyName)
          Reads the value from property file and/or the environment Values in property file supersede the values set in environment
 String getXmlBaseUrl()
           
static Environment valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Environment[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SANDBOX

public static final Environment SANDBOX

SANDBOX_TESTMODE

public static final Environment SANDBOX_TESTMODE

PRODUCTION

public static final Environment PRODUCTION

PRODUCTION_TESTMODE

public static final Environment PRODUCTION_TESTMODE

CUSTOM

public static final Environment CUSTOM
Method Detail

values

public static Environment[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Environment c : Environment.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Environment valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getBaseUrl

public String getBaseUrl()
Returns:
the baseUrl

getXmlBaseUrl

public String getXmlBaseUrl()
Returns:
the xmlBaseUrl

getCardPresentUrl

public String getCardPresentUrl()
Returns:
the cardPresentUrl

createEnvironment

public static Environment createEnvironment(String baseUrl,
                                            String xmlBaseUrl)
If a custom environment needs to be supported, this convenience create method can be used to pass in a custom baseUrl.

Parameters:
baseUrl -
xmlBaseUrl -
Returns:
Environment object

createEnvironment

public static Environment createEnvironment(String baseUrl,
                                            String xmlBaseUrl,
                                            String cardPresentUrl)
If a custom environment needs to be supported, this convenience create method can be used to pass in a custom baseUrl.

Parameters:
baseUrl -
xmlBaseUrl -
cardPresentUrl -
Returns:
Environment object

getIntProperty

public static int getIntProperty(String propertyName)
Reads a integer value from property file and/or the environment Values in property file supersede the values set in environment

Parameters:
propertyName - name of the integer property to read
Returns:
int property value

getBooleanProperty

public static boolean getBooleanProperty(String propertyName)
Reads a boolean value from property file and/or the environment Values in property file supersede the values set in environment

Parameters:
propertyName - name of the boolean property to read
Returns:
boolean property value

getProperty

public static String getProperty(String propertyName)
Reads the value from property file and/or the environment Values in property file supersede the values set in environment

Parameters:
propertyName - name of the property to read
Returns:
String property value


Copyright © 2014. All Rights Reserved.