### Legacy Authorize.Net AIM Credit Card Charge Example (Java) Source: https://github.com/authorizenet/sdk-java/blob/master/MIGRATING.md This Java code snippet illustrates how to process a credit card transaction using the now-deprecated Authorize.Net AIM (Advanced Integration Method) classes. It demonstrates the setup of a merchant object, defining credit card details, and executing an AUTH_CAPTURE transaction. This example serves to highlight the legacy approach that is no longer supported and requires migration to the new Authorize.Net API classes. ```java import net.authorize.DeviceType; import net.authorize.Environment; import net.authorize.MarketType; import net.authorize.Merchant; import net.authorize.TransactionType; import net.authorize.aim.Transaction; import net.authorize.aim.cardpresent.Result; import net.authorize.data.creditcard.CardType; import net.authorize.data.creditcard.CreditCard; public class ChargeCreditCard{ //AIM public static void main(String[] args) { CreditCard creditCard = CreditCard.createCreditCard(); creditCard.setCardType(CardType.VISA); creditCard.setCreditCardNumber("4111111111111111"); creditCard.setExpirationMonth("12"); creditCard.setExpirationYear("2020"); merchant = Merchant.createMerchant(Environment.SANDBOX, apiLoginID, transactionKey); merchant.setDeviceType(DeviceType.VIRTUAL_TERMINAL); merchant.setMarketType(MarketType.RETAIL); // create transaction Transaction authCaptureTransaction = merchant.createAIMTransaction( TransactionType.AUTH_CAPTURE, totalAmount); authCaptureTransaction.setCreditCard(creditCard); Result result = (Result) merchant.postTransaction(authCaptureTransaction); } } ``` -------------------------------- ### Get All TransactionType Enum Values Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/TransactionType.html Returns an array containing all constants of the `TransactionType` enum in their declared order. Includes a Java example for iteration. ```APIDOC TransactionType.values(): public static TransactionType[] values() Returns an array containing the constants of this enum type, in the order they are declared. Returns: an array containing the constants of this enum type, in the order they are declared ``` ```Java for (TransactionType c : TransactionType.values()) System.out.println(c); ``` -------------------------------- ### KeyManagementScheme.DUKPT.DeviceInfo Constructor Details Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/KeyManagementScheme.DUKPT.DeviceInfo.html Lists the constructors for the `KeyManagementScheme.DUKPT.DeviceInfo` class, showing the default public constructor. ```APIDOC ### Constructor Summary Constructor and Description `KeyManagementScheme.DUKPT.DeviceInfo()` ### Constructor Detail * #### KeyManagementScheme.DUKPT.DeviceInfo public KeyManagementScheme.DUKPT.DeviceInfo() ``` -------------------------------- ### HostedReceiptPageSettings Class API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/sim/data/HostedReceiptPageSettings.html Detailed API documentation for the `net.authorize.sim.data.HostedReceiptPageSettings` class, including its inheritance, overall purpose, and a summary of its methods with their signatures, parameters, and return types. ```APIDOC Class: net.authorize.sim.data.HostedReceiptPageSettings Extends: java.lang.Object Description: The hosted receipt page provides the customer with the status of their transaction and can include a link back to the merchant's website. It can be customized to reflect the look and feel of the merchant's website. Methods: Method: createHostedReceiptPageSettings() Modifier and Type: static HostedReceiptPageSettings Description: Creates an instance of a HostedReceiptPageSettings class. Returns: a HostedReceiptPageSettings object. Method: getLinkMethod() Modifier and Type: LinkMethod Returns: the linkMethod Method: getLinkText() Modifier and Type: java.lang.String Returns: the linkText Method: setLinkMethod(LinkMethod linkMethod) Modifier and Type: void Parameters: linkMethod: LinkMethod - the linkMethod to set Method: setLinkText(java.lang.String linkText) Modifier and Type: void Parameters: linkText: java.lang.String - (description missing in source) ``` -------------------------------- ### Get all EncodingType enum constants (Java) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/EncodingType.html Returns an array containing all constants of the `EncodingType` enum, in their declared order. This method is useful for iterating over all possible encoding types, for example: `for (EncodingType c : EncodingType.values()) System.out.println(c);` ```APIDOC public static net.authorize.api.contract.v1.EncodingType[] values() Returns: an array containing the constants of this enum type, in the order they are declared ``` -------------------------------- ### API Documentation for net.authorize.util Classes and Their Usage Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/util/package-use.html Provides an overview of key classes within the `net.authorize.util` package, detailing their purpose and functionality as used across the Authorize.Net Java SDK. This includes `BasicXmlDocument`, `BOMStripperInputStream`, and `BOMStripperInputStream.BOM`. ```APIDOC Package: net.authorize.util Classes and their usage across Authorize.Net Java SDK packages: - Class: BasicXmlDocument Used by: - net.authorize - net.authorize.aim.cardpresent - net.authorize.util - Class: BOMStripperInputStream Description: The `UnicodeBOMInputStream` class wraps any `InputStream` and detects the presence of any Unicode BOM (Byte Order Mark) at its beginning, as defined by RFC 3629 - UTF-8, a transformation format of ISO 10646. Used by: - net.authorize.util - Class: BOMStripperInputStream.BOM Description: Type safe enumeration class that describes the different types of Unicode BOMs. Used by: - net.authorize.util ``` -------------------------------- ### Get Transaction ID (Java API) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/ProfileTransPriorAuthCaptureType.html Gets the value of the transId property. ```APIDOC ProfileTransPriorAuthCaptureType.getTransId() Description: Gets the value of the transId property. Returns: java.lang.String - possible object is String ``` -------------------------------- ### KeyManagementScheme Class API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/KeyManagementScheme.html Detailed API documentation for the `KeyManagementScheme` class, including its field, constructor, and methods with their full signatures and descriptions. ```APIDOC Class: KeyManagementScheme Package: net.authorize.api.contract.v1 Fields: - Name: dukpt Type: KeyManagementScheme.DUKPT Modifier: protected Description: Represents the DUKPT key management scheme. Constructors: - Name: KeyManagementScheme() Modifier: public Description: Default constructor for KeyManagementScheme. Methods: - Name: getDUKPT() Modifier: public Return Type: KeyManagementScheme.DUKPT Description: Gets the value of the dukpt property. Returns: possible object is KeyManagementScheme.DUKPT - Name: setDUKPT(value) Modifier: public Return Type: void Description: Sets the value of the dukpt property. Parameters: - Name: value Type: KeyManagementScheme.DUKPT Description: allowed object is KeyManagementScheme.DUKPT ``` -------------------------------- ### Get Customer Shipping Address ID (Java API) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/ProfileTransPriorAuthCaptureType.html Gets the value of the customerShippingAddressId property. ```APIDOC ProfileTransPriorAuthCaptureType.getCustomerShippingAddressId() Description: Gets the value of the customerShippingAddressId property. Returns: java.lang.String - possible object is String ``` -------------------------------- ### APIDOC: Create KeyManagementScheme.DUKPT.DeviceInfo Instance Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/ObjectFactory.html Create an instance of KeyManagementScheme.DUKPT.DeviceInfo ```APIDOC public KeyManagementScheme.DUKPT.DeviceInfo createKeyManagementSchemeDUKPTDeviceInfo() ``` -------------------------------- ### Get Customer Payment Profile ID (Java API) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/ProfileTransPriorAuthCaptureType.html Gets the value of the customerPaymentProfileId property. ```APIDOC ProfileTransPriorAuthCaptureType.getCustomerPaymentProfileId() Description: Gets the value of the customerPaymentProfileId property. Returns: java.lang.String - possible object is String ``` -------------------------------- ### Authorize.Net Java SDK: CreateCustomerProfileController API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/controller/CreateCustomerProfileController.html Detailed API documentation for the `CreateCustomerProfileController` class, which extends `ApiOperationBase` and implements `IApiOperation`. This class is responsible for handling requests and responses related to creating customer profiles. ```APIDOC Class net.authorize.api.controller.CreateCustomerProfileController Inheritance Hierarchy: java.lang.Object net.authorize.api.controller.base.ApiOperationBase net.authorize.api.controller.CreateCustomerProfileController Implemented Interfaces: net.authorize.api.controller.base.IApiOperation Class Definition: public class CreateCustomerProfileController extends net.authorize.api.controller.base.ApiOperationBase Field Summary (Inherited from net.authorize.api.controller.base.ApiOperationBase): logger resultCode results Constructor Summary: CreateCustomerProfileController(apiRequest: net.authorize.api.contract.v1.CreateCustomerProfileRequest) Method Summary: getResponseType(): protected java.lang.Class validateRequest(): protected void ``` -------------------------------- ### Constructors for CreateFingerPrintResponse Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/CreateFingerPrintResponse.html Provides a summary of the constructors available for instantiating the `CreateFingerPrintResponse` class. ```Java CreateFingerPrintResponse() ``` -------------------------------- ### DeviceType Enum Methods API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/DeviceType.html Provides methods for interacting with the `DeviceType` enum, including retrieving all constants, getting a constant by name, and getting the string value of a constant. ```APIDOC DeviceType Enum Methods: values(): public static DeviceType[] Returns: an array containing the constants of this enum type, in the order they are declared. valueOf(name: java.lang.String): public static DeviceType name: the name of the enum constant to be returned. Returns: the enum constant with the specified name. Throws: java.lang.IllegalArgumentException: if this enum type has no constant with the specified name. java.lang.NullPointerException: if the argument is null. getValue(): public java.lang.String Returns: the value. ``` -------------------------------- ### Java API: getChargeChargeBackAmount Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/BatchStatisticType.html Gets the value of the chargeChargeBackAmount property. ```APIDOC getChargeChargeBackAmount(): java.math.BigDecimal Description: Gets the value of the chargeChargeBackAmount property. Returns: java.math.BigDecimal - The current charge chargeback amount. ``` -------------------------------- ### Java Class: BasicXmlDocument Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/util/package-summary.html No description provided. ```APIDOC Class: net.authorize.util.BasicXmlDocument Description: Basic XML document utility. ``` -------------------------------- ### Java API: getCorrectionNoticeCount Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/BatchStatisticType.html Gets the value of the correctionNoticeCount property. ```APIDOC getCorrectionNoticeCount(): java.lang.Integer Description: Gets the value of the correctionNoticeCount property. Returns: java.lang.Integer - The current correction notice count. ``` -------------------------------- ### Authorize.Net SIM Package API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/sim/package-summary.html Provides an overview of the classes and enums available in the `net.authorize.sim` package for Authorize.Net's Server Integration Method (SIM). This package contains components for handling transaction fingerprints, results, and various link methods. ```APIDOC Package: net.authorize.sim Class Summary: - Fingerprint - Result - Transaction Enum Summary: - LinkMethod: Description: The type of link back to the merchant's website. ``` -------------------------------- ### Java API: getChargebackCount Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/BatchStatisticType.html Gets the value of the chargebackCount property. ```APIDOC getChargebackCount(): java.lang.Integer Description: Gets the value of the chargebackCount property. Returns: java.lang.Integer - The current chargeback count. ``` -------------------------------- ### Build Java SDK with Ant Source: https://github.com/authorizenet/sdk-java/blob/master/README.md Compiles the Authorize.Net Java SDK and creates a .jar file using Ant. This is an alternative build method to Maven. ```bash ant jar ``` -------------------------------- ### Java API: getChargebackAmount Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/BatchStatisticType.html Gets the value of the chargebackAmount property. ```APIDOC getChargebackAmount(): java.math.BigDecimal Description: Gets the value of the chargebackAmount property. Returns: java.math.BigDecimal - The current chargeback amount. ``` -------------------------------- ### API Documentation: Class Summary for net.authorize.api.controller.base Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/controller/base/package-summary.html Lists the classes available in the `net.authorize.api.controller.base` package, including their generic type parameters and a placeholder for description. ```APIDOC Class Summary: Class: ApiOperationBase Description: ``` -------------------------------- ### API Documentation for CreateCustomerShippingAddressController Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/controller/CreateCustomerShippingAddressController.html Detailed API documentation for the `CreateCustomerShippingAddressController` class in the Authorize.Net Java SDK, including its inheritance, implemented interfaces, inherited fields, and constructor signature. ```APIDOC Class: net.authorize.api.controller.CreateCustomerShippingAddressController Extends: net.authorize.api.controller.base.ApiOperationBase Implements: net.authorize.api.controller.base.IApiOperation Fields (inherited from ApiOperationBase): - logger - resultCode - results Constructors: - CreateCustomerShippingAddressController(net.authorize.api.contract.v1.CreateCustomerShippingAddressRequest apiRequest) Methods: - protected java.lang.Class ``` -------------------------------- ### Java API: getReturnedItemCount Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/BatchStatisticType.html Gets the value of the returnedItemCount property. ```APIDOC getReturnedItemCount(): java.lang.Integer Description: Gets the value of the returnedItemCount property. Returns: java.lang.Integer - The current returned item count. ``` -------------------------------- ### Create Solution Instances in net.authorize.data.reporting Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/data/reporting/class-use/Solution.html This section details the static factory methods available in the `net.authorize.data.reporting.Solution` class for creating new `Solution` objects. These methods allow for the instantiation of `Solution` objects, either empty or pre-populated with an ID and name. ```APIDOC Solution.createSolution(): Solution Description: Create a solution. Solution.createSolution(java.lang.String id, java.lang.String name): Solution id: The ID of the solution. name: The name of the solution. Description: Creates a populated Solution ``` -------------------------------- ### Java API: getReturnedItemAmount Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/BatchStatisticType.html Gets the value of the returnedItemAmount property. ```APIDOC getReturnedItemAmount(): java.math.BigDecimal Description: Gets the value of the returnedItemAmount property. Returns: java.math.BigDecimal - The current returned item amount. ``` -------------------------------- ### Java API: getErrorCount Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/BatchStatisticType.html Gets the value of the errorCount property. ```APIDOC getErrorCount(): int Description: Gets the value of the errorCount property. Returns: int - The current error count. ``` -------------------------------- ### Build Java SDK with Maven Source: https://github.com/authorizenet/sdk-java/blob/master/README.md Compiles the Authorize.Net Java SDK and creates a .jar file using Maven. This command cleans previous builds and packages the project. ```bash mvn clean package ``` -------------------------------- ### Create Custom Environment (2 Parameters) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Environment.html If a custom environment needs to be supported, this convenience create method can be used to pass in a custom baseUrl and xmlBaseUrl. ```APIDOC public static Environment createEnvironment(java.lang.String baseUrl, java.lang.String xmlBaseUrl) Parameters: baseUrl: xmlBaseUrl: Returns: Environment object ``` -------------------------------- ### Java API: getDeclineCount Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/BatchStatisticType.html Gets the value of the declineCount property. ```APIDOC getDeclineCount(): int Description: Gets the value of the declineCount property. Returns: int - The current decline count. ``` -------------------------------- ### Java API: getVoidCount Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/BatchStatisticType.html Gets the value of the voidCount property. ```APIDOC getVoidCount(): int Description: Gets the value of the voidCount property. Returns: int - The current void count. ``` -------------------------------- ### API Documentation: Interface Summary for net.authorize.api.controller.base Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/controller/base/package-summary.html Lists the interfaces available in the `net.authorize.api.controller.base` package, including their generic type parameters and a placeholder for description. ```APIDOC Interface Summary: Interface: IApiOperation Description: ``` -------------------------------- ### CreateCustomerPaymentProfileController Class API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/controller/CreateCustomerPaymentProfileController.html Comprehensive API documentation for the `CreateCustomerPaymentProfileController` class, detailing its constructor, specific methods, and methods inherited from its parent classes. ```APIDOC Class: net.authorize.api.controller.CreateCustomerPaymentProfileController Constructor Detail: CreateCustomerPaymentProfileController( apiRequest: net.authorize.api.contract.v1.CreateCustomerPaymentProfileRequest ) Method Detail: validateRequest(): protected void Specified by: validateRequest() in class net.authorize.api.controller.base.ApiOperationBase getResponseType(): protected java.lang.Class Specified by: getResponseType() in class net.authorize.api.controller.base.ApiOperationBase Methods inherited from class net.authorize.api.controller.base.ApiOperationBase: afterExecute() beforeExecute() execute() execute(net.authorize.Environment) executeWithApiResponse() executeWithApiResponse(net.authorize.Environment) getApiRequest() getApiResponse() getEnvironment() getErrorResponse() getMerchantAuthentication() getResultCode() getResults() setApiRequest(Q) setEnvironment(net.authorize.Environment) setMerchantAuthentication(net.authorize.api.contract.v1.MerchantAuthenticationType) Methods inherited from class java.lang.Object: clone equals finalize getClass hashCode notify notifyAll toString wait wait wait ``` -------------------------------- ### Get Base URL Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Environment.html Retrieves the base URL configured for the environment. ```APIDOC public java.lang.String getBaseUrl() Returns: the baseUrl ``` -------------------------------- ### Java Solution Management API Methods Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/data/xml/reporting/TransactionDetails.html API documentation for the `getSolution` and `setSolution` methods, providing details on their signatures, return values, and parameters. These methods interact with the `Solution` class from `net.authorize.data.reporting`. ```APIDOC getSolution() Signature: public Solution getSolution() Returns: Type: Solution (net.authorize.data.reporting.Solution) Description: the solution setSolution(solution) Signature: public void setSolution(Solution solution) Parameters: solution: Type: Solution (net.authorize.data.reporting.Solution) Description: the solution to set ``` -------------------------------- ### Get Returned Items Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/TransactionDetailsType.html Retrieves a collection of items that have been returned in relation to the transaction. ```APIDOC public ArrayOfReturnedItem getReturnedItems() Returns: possible object is ArrayOfReturnedItem ``` -------------------------------- ### Get Customer IP Address Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/TransactionDetailsType.html Retrieves the IP address of the customer associated with the transaction. ```APIDOC public java.lang.String getCustomerIP() Returns: possible object is String ``` -------------------------------- ### Java Class: LogHelper Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/util/package-summary.html No description provided. ```APIDOC Class: net.authorize.util.LogHelper Description: Utility class for logging. ``` -------------------------------- ### Authorize.Net Java SDK Method Details Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/KeyManagementScheme.DUKPT.Mode.html Detailed API documentation for methods within the Authorize.Net Java SDK, including getters and setters for PIN and data properties. This section outlines method signatures, descriptions, parameters, and return types. ```APIDOC Method Detail: getPIN(): Signature: public java.lang.String getPIN() Description: Gets the value of the pin property. Returns: String setPIN(value: java.lang.String): Signature: public void setPIN(java.lang.String value) Description: Sets the value of the pin property. Parameters: value: allowed object is String Returns: void getData(): Signature: public java.lang.String getData() Description: Gets the value of the data property. Returns: String setData(value: java.lang.String): Signature: public void setData(java.lang.String value) Description: Sets the value of the data property. Parameters: value: allowed object is String Returns: void ``` -------------------------------- ### Get Market Type - Merchant Class Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Merchant.html Retrieves the market type associated with the merchant. ```APIDOC getMarketType() Returns: net.authorize.MarketType (enum) ``` -------------------------------- ### Generate Java SDK Javadocs with Ant Source: https://github.com/authorizenet/sdk-java/blob/master/README.md Generates Javadoc documentation for the Authorize.Net Java SDK using Ant. This command creates API documentation from the source code. ```bash ant javadoc ``` -------------------------------- ### Get Login - Merchant Class Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Merchant.html Retrieves the login ID used for merchant authentication. ```APIDOC getLogin() Returns: java.lang.String ``` -------------------------------- ### ARBCreateSubscriptionController Class API Documentation Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/controller/ARBCreateSubscriptionController.html API documentation for the `ARBCreateSubscriptionController` class in the Authorize.Net Java SDK, detailing its inheritance, implemented interfaces, constructor, and methods for creating recurring billing subscriptions. ```APIDOC Class: net.authorize.api.controller.ARBCreateSubscriptionController Extends: net.authorize.api.controller.base.ApiOperationBase Implements: net.authorize.api.controller.base.IApiOperation Field Summary (Inherited from net.authorize.api.controller.base.ApiOperationBase): logger resultCode results Constructor Summary: ARBCreateSubscriptionController(net.authorize.api.contract.v1.ARBCreateSubscriptionRequest apiRequest) Method Summary: getResponseType(): protected java.lang.Class validateRequest(): protected void ``` -------------------------------- ### Get Device Type - Merchant Class Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Merchant.html Retrieves the device type associated with the merchant. ```APIDOC getDeviceType() Returns: net.authorize.DeviceType (enum) ``` -------------------------------- ### Solution Class API Documentation Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/data/reporting/Solution.html Detailed API documentation for the `Solution` class, outlining its public methods, their signatures, parameters, and return values. This class is part of the `net.authorize.data.reporting` package in the Authorize.Net Java SDK, providing standard object methods and property accessors/mutators. ```APIDOC Solution Class: toString(): java.lang.String Overrides toString in java.lang.Object. getId(): java.lang.String Returns: The ID. setId(id: java.lang.String): void id: The ID to set. getName(): java.lang.String Returns: The name. setName(name: java.lang.String): void name: The name to set. ``` -------------------------------- ### Get Card Present URL Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Environment.html Retrieves the Card Present URL configured for the environment. ```APIDOC public java.lang.String getCardPresentUrl() Returns: the cardPresentUrl ``` -------------------------------- ### Get XML Base URL Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Environment.html Retrieves the XML base URL configured for the environment. ```APIDOC public java.lang.String getXmlBaseUrl() Returns: the xmlBaseUrl ``` -------------------------------- ### Java Class: Luhn Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/util/package-summary.html No description provided. ```APIDOC Class: net.authorize.util.Luhn Description: Utility class for Luhn algorithm validation. ``` -------------------------------- ### Get Mobile Device ID Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/TransactionDetailsType.html Retrieves the unique identifier for the mobile device used in the transaction. ```APIDOC public java.lang.String getMobileDeviceId() Returns: possible object is String ``` -------------------------------- ### Java Class: StringUtils Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/util/package-summary.html No description provided. ```APIDOC Class: net.authorize.util.StringUtils Description: Utility class for string manipulation. ``` -------------------------------- ### Authorize.Net Java SDK Base Controller Package API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/controller/base/package-frame.html This section provides a structured reference for the `net.authorize.api.controller.base` package, outlining its primary interfaces and classes. It serves as a quick guide to the foundational components for API operations within the SDK. ```APIDOC Package: net.authorize.api.controller.base Description: Base controller package for Authorize.Net Java SDK. Interfaces: IApiOperation Location: net.authorize.api.controller.base Classes: ApiOperationBase Location: net.authorize.api.controller.base ``` -------------------------------- ### Get Product Value Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/TransactionDetailsType.html Retrieves the value of the 'product' property, which typically identifies the product being transacted. ```APIDOC public java.lang.String getProduct() Returns: possible object is String ``` -------------------------------- ### Get User Reference - Merchant Class Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Merchant.html Retrieves the user reference value associated with the merchant. ```APIDOC getUserRef() Returns: java.lang.String ``` -------------------------------- ### PrepaidCard Class API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/aim/cardpresent/PrepaidCard.html Detailed API documentation for the `net.authorize.aim.cardpresent.PrepaidCard` class, including its constructors and methods for handling prepaid card operations like setting/getting amounts and balances. ```APIDOC Class: net.authorize.aim.cardpresent.PrepaidCard Inherited Methods from java.lang.Object: - clone() - equals() - finalize() - getClass() - hashCode() - notify() - notifyAll() - wait() - wait(long timeout) - wait(long timeout, int nanos) Constructors: - PrepaidCard() Signature: protected PrepaidCard() Description: Default C'tor Methods: - createPrepaidCard() Signature: public static PrepaidCard createPrepaidCard() Description: Create a prepaidCard. Returns: PrepaidCard with empty fields - createPrepaidCard(double requestedAmount, double approvedAmount, double balanceAmountOnCard) Signature: public static PrepaidCard createPrepaidCard(double requestedAmount, double approvedAmount, double balanceAmountOnCard) Description: Creates a populated PrepaidCard Parameters: - requestedAmount: double - amount requested in the transaction - approvedAmount: double - amount approved in the transaction - balanceAmountOnCard: double - remaining balance on the card Returns: PrepaidCard with fields populated - createPrepaidCard(java.lang.String requestedAmount, java.lang.String approvedAmount, java.lang.String balanceAmountOnCard) Signature: public static PrepaidCard createPrepaidCard(java.lang.String requestedAmount, java.lang.String approvedAmount, java.lang.String balanceAmountOnCard) Description: Creates a populated PrepaidCard Parameters: - requestedAmount: java.lang.String - amount requested in the transaction - approvedAmount: java.lang.String - amount approved in the transaction - balanceAmountOnCard: java.lang.String - remaining balance on the card Returns: PrepaidCard with fields populated - getApprovedAmount() Signature: public double getApprovedAmount() Description: Gets amount approved in the transaction Returns: double - amount approved in the transaction - getBalanceAmountOnCard() Signature: public double getBalanceAmountOnCard() Description: Gets remaining balance on the card Returns: double - remaining balance on the card - getRequestedAmount() Signature: public double getRequestedAmount() Description: Gets amount requested in the transaction Returns: double - amount requested in the transaction - setApprovedAmount(double approvedAmount) Signature: public void setApprovedAmount(double approvedAmount) Description: Set amount approved in the transaction Parameters: - approvedAmount: double - amount approved in the transaction - setBalanceAmountOnCard(double balanceAmountOnCard) Signature: public void setBalanceAmountOnCard(double balanceAmountOnCard) Description: Sets remaining balance on the card Parameters: - balanceAmountOnCard: double - remaining balance on the card - setRequestedAmount(double requestedAmount) Signature: public void setRequestedAmount(double requestedAmount) Description: Sets amount requested in the transaction Parameters: - requestedAmount: double - amount requested in the transaction - setRequestedAmount(java.lang.String requestedAmount) Signature: void setRequestedAmount(java.lang.String requestedAmount) Description: Sets amount requested in the transaction Parameters: - requestedAmount: java.lang.String - toString() Signature: java.lang.String toString() Description: (Standard Java toString method) ``` -------------------------------- ### Get Transaction Key - Merchant Class Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Merchant.html Retrieves the transaction key used for merchant authentication. ```APIDOC getTransactionKey() Returns: java.lang.String ``` -------------------------------- ### API Documentation for CreateCustomerProfileResponse Class Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/CreateCustomerProfileResponse.html Comprehensive API documentation for the `CreateCustomerProfileResponse` class, including its protected properties, public constructor, and public getter/setter methods for various customer profile-related IDs and validation responses. ```APIDOC Class: CreateCustomerProfileResponse Properties: customerProfileId: protected java.lang.String customerPaymentProfileIdList: protected ArrayOfNumericString customerShippingAddressIdList: protected ArrayOfNumericString validationDirectResponseList: protected ArrayOfString Constructor: CreateCustomerProfileResponse(): public Methods: getCustomerProfileId(): public java.lang.String Description: Gets the value of the customerProfileId property. Returns: String setCustomerProfileId(value: java.lang.String): public void Description: Sets the value of the customerProfileId property. Parameters: value: allowed object is String getCustomerPaymentProfileIdList(): public ArrayOfNumericString Description: Gets the value of the customerPaymentProfileIdList property. Returns: ArrayOfNumericString setCustomerPaymentProfileIdList(value: ArrayOfNumericString): public void Description: Sets the value of the customerPaymentProfileIdList property. Parameters: value: allowed object is ArrayOfNumericString getCustomerShippingAddressIdList(): public ArrayOfNumericString Description: Gets the value of the customerShippingAddressIdList property. Returns: ArrayOfNumericString setCustomerShippingAddressIdList(value: ArrayOfNumericString): public void Description: Sets the value of the customerShippingAddressIdList property. Parameters: value: allowed object is ArrayOfNumericString getValidationDirectResponseList(): public ArrayOfString Description: Gets the value of the validationDirectResponseList property. Returns: ArrayOfString setValidationDirectResponseList(value: ArrayOfString): public void Description: Sets the value of the validationDirectResponseList property. Parameters: value: allowed object is ArrayOfString ``` -------------------------------- ### Get MD5 Value - Merchant Class Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Merchant.html Retrieves the MD5 hash value associated with the merchant. ```APIDOC getMD5Value() Returns: java.lang.String ``` -------------------------------- ### API Reference for CreateCustomerProfileController Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/allclasses-noframe.html Provides API details for the class CreateCustomerProfileController, including its type and package location within the Authorize.Net Java SDK. This controller manages the creation of customer profiles. ```APIDOC CreateCustomerProfileController: class (net.authorize.api.controller) ``` -------------------------------- ### CreateProfileResponse Class API Reference (Java) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/CreateProfileResponse.html Comprehensive API documentation for the `net.authorize.api.contract.v1.CreateProfileResponse` class, detailing its properties, constructor, and methods for managing customer profile creation responses. ```APIDOC Class: net.authorize.api.contract.v1.CreateProfileResponse Description: Represents the response object for creating a customer profile, containing IDs for the created profile, payment profiles, and shipping addresses, along with messages. Fields: - messages: protected net.authorize.api.contract.v1.MessagesType - customerProfileId: protected java.lang.String - customerPaymentProfileIdList: protected net.authorize.api.contract.v1.ArrayOfNumericString - customerShippingAddressIdList: protected net.authorize.api.contract.v1.ArrayOfNumericString Constructors: - CreateProfileResponse(): public CreateProfileResponse() Methods: - getCustomerShippingAddressIdList(): Signature: net.authorize.api.contract.v1.ArrayOfNumericString getCustomerShippingAddressIdList() Description: Gets the value of the customerShippingAddressIdList property. - getMessages(): Signature: public net.authorize.api.contract.v1.MessagesType getMessages() Description: Gets the value of the messages property. Returns: possible object is net.authorize.api.contract.v1.MessagesType - setCustomerPaymentProfileIdList(value: net.authorize.api.contract.v1.ArrayOfNumericString): Signature: void setCustomerPaymentProfileIdList(net.authorize.api.contract.v1.ArrayOfNumericString value) Description: Sets the value of the customerPaymentProfileIdList property. Parameters: - value: net.authorize.api.contract.v1.ArrayOfNumericString - setCustomerProfileId(value: java.lang.String): Signature: public void setCustomerProfileId(java.lang.String value) Description: Sets the value of the customerProfileId property. Parameters: - value: java.lang.String - setCustomerShippingAddressIdList(value: net.authorize.api.contract.v1.ArrayOfNumericString): Signature: void setCustomerShippingAddressIdList(net.authorize.api.contract.v1.ArrayOfNumericString value) Description: Sets the value of the customerShippingAddressIdList property. Parameters: - value: net.authorize.api.contract.v1.ArrayOfNumericString - setMessages(value: net.authorize.api.contract.v1.MessagesType): Signature: public void setMessages(net.authorize.api.contract.v1.MessagesType value) Description: Sets the value of the messages property. Parameters: - value: allowed object is net.authorize.api.contract.v1.MessagesType - getCustomerProfileId(): Signature: public java.lang.String getCustomerProfileId() Description: Gets the value of the customerProfileId property. Returns: possible object is String Inherited Methods from java.lang.Object: - clone(): protected Object clone() throws CloneNotSupportedException - equals(Object obj): public boolean equals(Object obj) - finalize(): protected void finalize() throws Throwable - getClass(): public final Class getClass() - hashCode(): public int hashCode() - notify(): public final void notify() - notifyAll(): public final void notifyAll() - toString(): public String toString() - wait(): public final void wait() throws InterruptedException - wait(long timeout): public final void wait(long timeout) throws InterruptedException - wait(long timeout, int nanos): public final void wait(long timeout, int nanos) throws InterruptedException ``` -------------------------------- ### Get Merchant Account Property Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/MobileDeviceLoginResponse.html Retrieves the `merchantAccount` property, which contains retail transaction information for the merchant. ```APIDOC public net.authorize.api.contract.v1.TransRetailInfoType getMerchantAccount() Returns: possible object is net.authorize.api.contract.v1.TransRetailInfoType ``` -------------------------------- ### Get string value of EncodingType enum constant (Java) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/EncodingType.html Returns the string representation of the enum constant. ```APIDOC public java.lang.String value() ``` -------------------------------- ### Java Class: Constants Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/util/package-summary.html No description provided. ```APIDOC Class: net.authorize.util.Constants Description: Utility class for constants. ``` -------------------------------- ### Authorize.Net Java SDK Environment Enum API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Environment.html Comprehensive API documentation for the `net.authorize.Environment` enum, detailing its purpose, inheritance, implemented interfaces, available enum constants, and the `createEnvironment` method for custom environment configuration. It also includes extensive notes on testing strategies for payment gateway transactions. ```APIDOC Environment (net.authorize.Environment) Type: Enum Extends: java.lang.Enum Implements: java.io.Serializable java.lang.Comparable Description: 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 Constants: CUSTOM HOSTED_VM LOCAL_VM PRODUCTION PRODUCTION_TESTMODE SANDBOX SANDBOX_TESTMODE Methods: createEnvironment(baseUrl: java.lang.String, xmlBaseUrl: java.lang.String): net.authorize.Environment Description: If a custom environment needs to be supported, this convenience create method can be used to pass in a custom baseUrl. Parameters: baseUrl: The base URL for the custom environment. xmlBaseUrl: The XML base URL for the custom environment. Returns: A new Environment instance configured with the custom URLs. ``` -------------------------------- ### Get Field Name Value Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/ResponseField.html Returns the string value representing the field name of this `ResponseField` instance. ```APIDOC net.authorize.ResponseField: getFieldName() -> java.lang.String Returns: The fieldName. ``` -------------------------------- ### APIDOC: Create KeyManagementScheme.DUKPT.Mode Instance Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/ObjectFactory.html Create an instance of KeyManagementScheme.DUKPT.Mode ```APIDOC public KeyManagementScheme.DUKPT.Mode createKeyManagementSchemeDUKPTMode() ``` -------------------------------- ### Get Response Order Value Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/ResponseField.html Returns the integer value representing the response order of this `ResponseField` instance. ```APIDOC net.authorize.ResponseField: getResponseOrder() -> int Returns: The responseOrder. ``` -------------------------------- ### Create Custom Environment (3 Parameters) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/Environment.html If a custom environment needs to be supported, this convenience create method can be used to pass in a custom baseUrl, xmlBaseUrl, and cardPresentUrl. ```APIDOC public static Environment createEnvironment(java.lang.String baseUrl, java.lang.String xmlBaseUrl, java.lang.String cardPresentUrl) Parameters: baseUrl: xmlBaseUrl: cardPresentUrl: Returns: Environment object ``` -------------------------------- ### Manage Reference ID (Java) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/cim/Transaction.html Documents methods for getting and setting the reference ID associated with a transaction or profile. ```APIDOC getRefId(): Description: Returns the reference ID. Returns: java.lang.String: the refId setRefId(refId: java.lang.String): Description: Sets the reference ID. Parameters: refId: the refId to set Returns: void ``` -------------------------------- ### API Reference: BOMStripperInputStream (Java) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/util/BOMStripperInputStream.html Comprehensive API documentation for the `net.authorize.util.BOMStripperInputStream` class, detailing its purpose, inheritance, nested classes, constructors, and methods for handling Unicode Byte Order Marks in input streams. ```APIDOC Class: net.authorize.util.BOMStripperInputStream extends java.io.InputStream implements java.io.Closeable, java.lang.AutoCloseable Description: The `UnicodeBOMInputStream` class wraps any `InputStream` and detects the presence of any Unicode BOM (Byte Order Mark) at its beginning, as defined by RFC 3629 - UTF-8, a transformation format of ISO 10646. The Unicode FAQ defines 5 types of BOMs: - 00 00 FE FF = UTF-32, big-endian - FF FE 00 00 = UTF-32, little-endian - FE FF = UTF-16, big-endian - FF FE = UTF-16, little-endian - EF BB BF = UTF-8 Use the `getBOM()` method to know whether a BOM has been detected or not. Use the `skipBOM()` method to remove the detected BOM from the wrapped `InputStream` object. Source: http://stackoverflow.com/questions/1835430/byte-order-mark-screws-up-file-reading-in-java/1835529#1835529 Nested Classes: static class BOMStripperInputStream.BOM Description: Type safe enumeration class that describes the different types of Unicode BOMs. Constructors: BOMStripperInputStream(java.io.InputStream inputStream) Description: Constructs a new `UnicodeBOMInputStream` that wraps the specified `InputStream`. Parameters: inputStream: The input stream to wrap. Methods: int available() Description: Returns the number of bytes that can be read from this input stream without blocking. void close() Description: Closes this input stream and releases any system resources associated with the stream. BOMStripperInputStream.BOM getBOM() Description: Returns the `BOM` that was detected in the wrapped `InputStream` object. void mark(int readlimit) Description: Marks the current position in this input stream. boolean markSupported() Description: Tests if this input stream supports the `mark` and `reset` methods. int read() Description: Reads the next byte of data from the input stream. int read(byte[] b) Description: Reads up to `b.length` bytes of data from the input stream into an array of bytes. Parameters: b: The buffer into which the data is read. ``` -------------------------------- ### Get Transaction Type Enum Property Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/XXDoNotUseDummyRequest.html Retrieves the current value of the transactionTypeEnum property, which represents the type of transaction. ```APIDOC TransactionTypeEnum getTransactionTypeEnum() Gets the value of the transactionTypeEnum property. ``` -------------------------------- ### Get PrePaidCard Object (Java) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/TransactionResponse.html Retrieves the PrePaidCard object associated with the transaction. This method returns an instance of TransactionResponse.PrePaidCard. ```APIDOC getPrePaidCard: Signature: public TransactionResponse.PrePaidCard getPrePaidCard() Description: Gets the value of the prePaidCard property. Returns: type: TransactionResponse.PrePaidCard description: possible object is `TransactionResponse.PrePaidCard` ``` -------------------------------- ### Authorize.Net Java SDK: net.authorize.sim.button Package API Reference Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/sim/button/package-frame.html Provides an overview of the `net.authorize.sim.button` package, including its core classes for button creation and an enumeration for button types, essential for developers working with Authorize.Net SIM integrations. ```APIDOC Package: net.authorize.sim.button Classes: - Button: Represents a generic button. - ImageButton: Represents a button with an image. - TextButton: Represents a button with text. Enums: - ButtonType: Defines types of buttons. ``` -------------------------------- ### Usage of AVSCode in net.authorize.aim.cardpresent Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/data/creditcard/package-use.html Details how the `AVSCode` class from `net.authorize.data.creditcard` is used within the `net.authorize.aim.cardpresent` package, specifically for Address Verification Service response codes. ```APIDOC Used by: net.authorize.aim.cardpresent Class: AVSCode Description: Address Verification Service (AVS) response codes. ``` -------------------------------- ### Get Account Type (Java) Source: https://github.com/authorizenet/sdk-java/blob/master/docs/javadocs/net/authorize/api/contract/v1/TransactionResponse.html Retrieves the account type. This method returns a String representing the account type. ```APIDOC getAccountType: Signature: public java.lang.String getAccountType() Description: Gets the value of the accountType property. Returns: type: String description: possible object is `String` ```