net.authorize
Class Merchant

java.lang.Object
  extended by net.authorize.Merchant
All Implemented Interfaces:
Serializable

public class Merchant
extends Object
implements Serializable

Container to hold authentication credentials. The Merchant is also responsible for creating transactions and posting them to the gateway are performed through the Merchant.

See Also:
Serialized Form

Field Summary
static String CP_VERSION
           
static int MAX_LOGIN_LENGTH
           
static int MAX_TRANSACTION_KEY_LENGTH
           
 
Method Summary
 Transaction createAIMTransaction(TransactionType transactionType, BigDecimal amount)
          Creates a new AIM Transaction.
 Transaction createARBTransaction(TransactionType transactionType, Subscription subscription)
          Creates a new ARB Transaction.
 Transaction createCIMTransaction(TransactionType transactionType)
          Creates a new CIM Transaction.
static Merchant createMerchant(Environment environment, String login, String transactionKey)
           
 Transaction createReportingTransaction(TransactionType transactionType)
          Creates a new Reporting Transaction.
 Transaction createSIMTransaction(TransactionType transactionType, long fingerPrintSequence, BigDecimal amount)
          Creates a new SIM Transaction.
 DeviceType getDeviceType()
           
 Environment getEnvironment()
          Get the Environment that transactions will be posted against.
 String getLogin()
          Get the login.
 MarketType getMarketType()
           
 String getMD5Value()
           
 String getTransactionKey()
          Get the transaction key.
 String getUserRef()
          Get the UserRef value.
 boolean isAllowPartialAuth()
          Return true if the merchant has been enabled, via the SDK, to allow partial AUTH transactions.
 boolean isSandboxEnvironment()
          Return true if the environment is a sandbox type environment.
 Result<?> postTransaction(Transaction transaction)
          Post a Transaction request to the payment gateway.
 void setAllowPartialAuth(boolean allowPartialAuth)
          Indicates if the transaction is enabled for partial authorization.
 void setDeviceType(DeviceType deviceType)
           
 void setEnvironment(Environment environment)
          Set the environment that transactions will be posted against.
 void setMarketType(MarketType marketType)
           
 void setMD5Value(String MD5Value)
           
 void setUserRef(String userRef)
          Set the userRef for Card Present transactions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CP_VERSION

public static final String CP_VERSION
See Also:
Constant Field Values

MAX_LOGIN_LENGTH

public static final int MAX_LOGIN_LENGTH
See Also:
Constant Field Values

MAX_TRANSACTION_KEY_LENGTH

public static final int MAX_TRANSACTION_KEY_LENGTH
See Also:
Constant Field Values
Method Detail

createMerchant

public static Merchant createMerchant(Environment environment,
                                      String login,
                                      String transactionKey)

getLogin

public String getLogin()
Get the login.

Returns:
the login

getTransactionKey

public String getTransactionKey()
Get the transaction key.

Returns:
the transactionKey

isAllowPartialAuth

public boolean isAllowPartialAuth()
Return true if the merchant has been enabled, via the SDK, to allow partial AUTH transactions.

Returns:
the allowPartialAuth

setAllowPartialAuth

public void setAllowPartialAuth(boolean allowPartialAuth)
Indicates if the transaction is enabled for partial authorization. Including this field in the transaction request overrides your account configuration.

Parameters:
allowPartialAuth - the allowPartialAuth to set

getEnvironment

public Environment getEnvironment()
Get the Environment that transactions will be posted against.

Returns:
the environment

setEnvironment

public void setEnvironment(Environment environment)
Set the environment that transactions will be posted against.

Parameters:
environment - the environment to set

isSandboxEnvironment

public boolean isSandboxEnvironment()
Return true if the environment is a sandbox type environment.

Returns:
true if in the sandbox environment

getMarketType

public MarketType getMarketType()
Returns:
the marketType

setMarketType

public void setMarketType(MarketType marketType)
Parameters:
marketType - the marketType to set

getDeviceType

public DeviceType getDeviceType()
Returns:
the deviceType

setDeviceType

public void setDeviceType(DeviceType deviceType)
Parameters:
deviceType - the deviceType to set

getMD5Value

public String getMD5Value()
Returns:
the MD5Value

setMD5Value

public void setMD5Value(String MD5Value)
Parameters:
MD5Value - the MD5Value to set

getUserRef

public String getUserRef()
Get the UserRef value.

Returns:
the userRef

setUserRef

public void setUserRef(String userRef)
Set the userRef for Card Present transactions.

Parameters:
userRef - the userRef to set

createAIMTransaction

public Transaction createAIMTransaction(TransactionType transactionType,
                                        BigDecimal amount)
Creates a new AIM Transaction.

Parameters:
transactionType -
amount -
Returns:
A newly created Transaction will be returned.

createSIMTransaction

public Transaction createSIMTransaction(TransactionType transactionType,
                                        long fingerPrintSequence,
                                        BigDecimal amount)
Creates a new SIM Transaction.

Parameters:
transactionType -
fingerPrintSequence -
amount -
Returns:
A newly created Transaction will be returned.

createARBTransaction

public Transaction createARBTransaction(TransactionType transactionType,
                                        Subscription subscription)
Creates a new ARB Transaction.

Parameters:
transactionType -
Returns:
A newly created Transaction will be returned.

createCIMTransaction

public Transaction createCIMTransaction(TransactionType transactionType)
Creates a new CIM Transaction.

Parameters:
transactionType -
Returns:
A newly created Transaction will be returned.

createReportingTransaction

public Transaction createReportingTransaction(TransactionType transactionType)
Creates a new Reporting Transaction.

Parameters:
transactionType -
Returns:
A newly created Transaction will be returned.

postTransaction

public Result<?> postTransaction(Transaction transaction)
Post a Transaction request to the payment gateway.

Parameters:
transaction -
Returns:
Result is returned with each post.


Copyright © 2014. All Rights Reserved.