Skip to content

Commit 82d9a6d

Browse files
committed
Merge pull request AuthorizeNet#36 from AuthorizeNet/future
Merge the 1.8.3 release into Master
2 parents ef254e8 + 854538a commit 82d9a6d

File tree

1,048 files changed

+51832
-55390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,048 files changed

+51832
-55390
lines changed

.classpath

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@
99
<classpathentry kind="lib" path="lib/junit-4.8.2.jar"/>
1010
<classpathentry kind="lib" path="lib/log4j-1.2.16.jar"/>
1111
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
12+
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
13+
<classpathentry kind="lib" path="lib/hamcrest-library-1.3.jar"/>
14+
<classpathentry kind="lib" path="lib/jmock-2.6.0.jar"/>
1215
<classpathentry kind="output" path="target/classes"/>
1316
</classpath>

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language:
2+
java
3+
4+
after_script:
5+
print_surefire_reports.sh
6+

README

Lines changed: 0 additions & 638 deletions
This file was deleted.

README.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Authorize.Net Java SDK
22
======================
3+
[![Build Status](https://travis-ci.org/AuthorizeNet/sdk-java.png?branch=future)]
4+
(https://travis-ci.org/AuthorizeNet/sdk-java)
5+
36
```
47
<groupId>net.authorize</groupId>
58
<artifactId>anet-java-sdk</artifactId>
@@ -20,19 +23,20 @@ Prerequisites
2023
Dependencies
2124
============
2225

23-
The SDK is offered with very few dependencies.
24-
2526
* commons-logging-1.1.1.jar : logging
2627
* log4j-1.2.16.jar : logging
2728
* httpclient-4.0.1.jar : http communication with the payment gateway
2829
* httpcore-4.0.1.jar : http communication with the payment gateway
2930
* junit-4.8.2.jar : unit testing
31+
* hamcrest-core-1.3.jar : unit testing
32+
* hamcrest-library-1.3.jar : unit testing
33+
* jmock-2.6.0.jar : unit testing
3034

3135
Build process
3236
==============
3337

3438
* Note: To properly run the unit tests, please reference the
35-
anet_java_sdk.properties.example file, which is a simple properties file that
39+
anet-java-sdk.properties file, which is a simple properties file that
3640
holds the API credentials for testing the SDK.
3741

3842

@@ -71,7 +75,7 @@ capture basic auth/capture (product purchase) functionality, which most
7175
integrations are looking to get started with.
7276

7377
A simple auth/capture can be performed with the following code (JSP) :
74-
78+
````
7579
<%@ page import="java.math.BigDecimal" %>
7680
<%@ page import="java.util.Map" %>
7781
<%@ page import="net.authorize.Environment" %>
@@ -112,6 +116,7 @@ A simple auth/capture can be performed with the following code (JSP) :
112116
out.println(result.getReasonResponseCode() + " : " + result.getResponseText());
113117
}
114118
%>
119+
````
115120

116121
Test Code - Advanced Integration Method (AIM) + Card Present
117122
============================================================
@@ -120,7 +125,7 @@ There are some sample unit tests that are located in the test directory. Simila
120125
to the AIM test, however they leverage the Card Present API.
121126

122127
A simple auth/capture can be performed with the following code (JSP) :
123-
128+
````
124129
<%@ page import="java.math.BigDecimal" %>
125130
<%@ page import="java.util.Map" %>
126131
<%@ page import="net.authorize.Environment" %>
@@ -167,13 +172,15 @@ A simple auth/capture can be performed with the following code (JSP) :
167172
result.getResponseReasonCodes().get(0).getReasonText());
168173
}
169174
%>
175+
````
170176

171177
Test Code - Server Integration Method (SIM)
172178
===========================================
173179

174180
The SDK implementation for SIM is fairly concise. To easily create a finger-
175181
print for your form POST, you can reference the following code :
176182

183+
````
177184
Fingerprint fingerprint = Fingerprint.createFingerprint(
178185
"YOUR_API_LOGIN_ID",
179186
"YOUR_TRANSACTION_KEY",
@@ -184,18 +191,21 @@ print for your form POST, you can reference the following code :
184191
String x_fp_timestamp = fingerprint.getTimeStamp();
185192
String x_fp_hash = fingerprint.getFingerprintHash();
186193
194+
````
187195

188196
Parsing a Relay Response is performed by using the ResponseParser class.
189197
It takes as it's only method parameter a pipe (|) delimited string
190198
that represents the transaction response passed to the merchant by
191199
Authorize.net.
192-
200+
````
193201
HashMap<ResponseField, String> responseMap =
194202
ResponseParser.parseResponseString(responseString);
203+
````
195204

196205
Setting up the necessary data containers and getting a form that can be
197206
displayed directly on the page can be performed via the following code (JSP) :
198207

208+
````
199209
<%@ page import="net.authorize.sim.*" %>
200210
<%@ page import="net.authorize.sim.button.*" %>
201211
<%@ page import="net.authorize.data.*" %>
@@ -227,7 +237,7 @@ displayed directly on the page can be performed via the following code (JSP) :
227237
<INPUT TYPE='HIDDEN' NAME='x_test_request' VALUE='FALSE'>
228238
<INPUT TYPE='SUBMIT' NAME='submit_button' VALUE='Submit' CLASS='null'>
229239
</FORM>
230-
240+
````
231241

232242
If you were to load this JSP in your browser and hit submit, you should be taken
233243
to a page on the Authorize.Net servers that contains a form asking for payment
@@ -244,10 +254,12 @@ your public facing MERCHANT_HOST domain name. Note, you may want to alter the
244254
relayResponseUrl and place the jsp in a separate webapp container of your
245255
choosing.
246256

247-
========
248-
form.jsp
249-
========
257+
````
250258
259+
==================
260+
form.jsp
261+
==================
262+
251263
<%@ page import="net.authorize.sim.*" %>
252264
<%
253265
String apiLoginId = "YOUR_API_LOGIN_ID";
@@ -284,7 +296,7 @@ choosing.
284296
<INPUT TYPE='HIDDEN' NAME='notes' VALUE='extra hot please'>
285297
<INPUT TYPE='SUBMIT' NAME='buy_button' VALUE='BUY'>
286298
</FORM>
287-
299+
````
288300

289301
* Create a page that will receive the response. We're calling this
290302
relay_response.jsp (referenced in the form above by the relayResponseUrl).
@@ -294,6 +306,7 @@ MD5_HASH_KEY. Unless you have explicitly set this in the merchant interface:
294306
Account > Settings > Security Settings > MD5-Hash, leave this as an empty
295307
string.
296308

309+
````
297310
==================
298311
relay_response.jsp
299312
==================
@@ -354,10 +367,12 @@ string.
354367
</body>
355368
</html>
356369
370+
````
357371

358372
* Create a page, called order_receipt.jsp, that will host the receipt
359373
information. This is what the user will finally see.
360374

375+
````
361376
=================
362377
order_receipt.jsp
363378
=================
@@ -411,7 +426,7 @@ information. This is what the user will finally see.
411426
%>
412427
</body>
413428
</html>
414-
429+
````
415430

416431
Upon loading form.jsp and following the steps, you should have been able to
417432
successfully enter in your credit card information hit submit and receive a
@@ -425,6 +440,7 @@ capture basic create/update/cancel/get subscription recurring billing requests.
425440

426441
A simple subscription creation can be performed with the following code (JSP) :
427442

443+
````
428444
<%@ page import="java.math.BigDecimal" %>
429445
<%@ page import="net.authorize.Merchant" %>
430446
<%@ page import="net.authorize.Environment" %>
@@ -488,7 +504,7 @@ A simple subscription creation can be performed with the following code (JSP) :
488504
out.println("Message code/text: " + message.getCode() + " - " + message.getText() + "<br/>");
489505
}
490506
%>
491-
507+
````
492508

493509
Test Code - Customer Information Manager (CIM)
494510
==============================================
@@ -499,6 +515,7 @@ information, including payment and address information.
499515

500516
A simple customer profile can be created with the following code (JSP) :
501517

518+
````
502519
<%@ page import="net.authorize.Merchant" %>
503520
<%@ page import="net.authorize.Environment" %>
504521
<%@ page import="net.authorize.Transaction" %>
@@ -559,7 +576,7 @@ A simple customer profile can be created with the following code (JSP) :
559576
out.println(message.getCode() + " - " + message.getText() + "<br>");
560577
}
561578
%>
562-
579+
````
563580

564581
Test Code - Transaction Details
565582
===============================
@@ -568,7 +585,7 @@ There are some sample unit tests that are located in the test directory. They
568585
capture requests that retrieve transaction data that was processed by Authorize.Net.
569586

570587
A simple batch list request can be created with the following code (JSP) :
571-
588+
````
572589
<%@ page import="net.authorize.Merchant" %>
573590
<%@ page import="net.authorize.Environment" %>
574591
<%@ page import="net.authorize.Transaction" %>
@@ -622,4 +639,5 @@ A simple batch list request can be created with the following code (JSP) :
622639
}
623640
}
624641
%>
642+
````
625643

anet-java-sdk.properties

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# populate this file and put it into your ${user.home} directory named as
2+
# anet-java-sdk.properties
3+
#
4+
# If using Eclipse, set working directory in your Run/Debug configuration to ${user.home}
5+
#
6+
api.login.id=API_LOGIN_ID
7+
transaction.key=TRANSACTION_KEY
8+
md5.hash.key=MD5_HASH_KEY
9+
10+
# if behind a proxy, use these settings:
11+
# http.proxyHost=HTTP_PROXY_HOST
12+
# http.proxyPort=HTTP_PROXY_PORT
13+
# http.ProxyUse=true
14+
# https.proxyHost=HTTPS_PROXY_HOST
15+
# https.proxyPort=HTTPS_PROXY_PORT
16+
# https.proxyUse=true

build.properties.example

Lines changed: 0 additions & 8 deletions
This file was deleted.

build.xml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,14 @@
99
<property name="lib.dir" value="${basedir}/lib" />
1010
<property name="src.tests" value="${basedir}/src/test/java" />
1111
<property name="resources.dir" value="${basedir}/resources" />
12-
<property name="reports.tests" value="${src.tests}/reports" />
12+
<property name="reports.tests" value="${basedir}/target/reports" />
1313
<property name="javac.version" value="1.5" />
14-
<!--
15-
<property file="${resources.dir}/build.properties"/>
16-
-->
17-
<!-- build.properties related info -->
18-
<property file="${user.home}/build.properties" />
14+
1915
<property file="${user.home}/${ant.project.name}.properties" />
2016

21-
<property name="prop.message" value="must be defined, preferably in ${user.home}/build.properties or ${user.home}/${ant.project.name}.properties" />
17+
<property name="prop.message" value="must be defined in ${user.home}/${ant.project.name}.properties" />
2218
<fail message="api.login.id ${prop.message}" unless="api.login.id" />
2319
<fail message="transaction.key ${prop.message}" unless="transaction.key" />
24-
<fail message="cp.api.login.id ${prop.message}" unless="cp.api.login.id" />
25-
<fail message="cp.transaction.key ${prop.message}" unless="cp.transaction.key" />
2620
<fail message="md5.hash.key ${prop.message}" unless="md5.hash.key" />
2721

2822
<path id="classpath">
@@ -94,8 +88,6 @@
9488
</classpath>
9589
<sysproperty key="API_LOGIN_ID" value="${api.login.id}" />
9690
<sysproperty key="TRANSACTION_KEY" value="${transaction.key}" />
97-
<sysproperty key="CP_API_LOGIN_ID" value="${cp.api.login.id}" />
98-
<sysproperty key="CP_TRANSACTION_KEY" value="${cp.transaction.key}" />
9991
<sysproperty key="MD5_HASH_KEY" value="${md5.hash.key}" />
10092
<formatter type="plain" />
10193
<batchtest fork="yes" todir="${reports.tests}">

docs/javadocs/allclasses-frame.html

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
<!-- NewPage -->
33
<html lang="en">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_05) on Tue Aug 05 17:26:45 PDT 2014 -->
5+
<!-- Generated by javadoc (version 1.7.0_55) on Wed Dec 17 13:21:21 PST 2014 -->
66
<title>All Classes (Authorize.Net Java SDK)</title>
7-
<meta name="date" content="2014-08-05">
7+
<meta name="date" content="2014-12-17">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
9-
<script type="text/javascript" src="script.js"></script>
109
</head>
1110
<body>
12-
<h1 class="bar">All&nbsp;Classes</h1>
11+
<h1 class="bar">All Classes</h1>
1312
<div class="indexContainer">
1413
<ul>
1514
<li><a href="net/authorize/api/contract/v1/AccountTypeEnum.html" title="enum in net.authorize.api.contract.v1" target="classFrame">AccountTypeEnum</a></li>
@@ -80,13 +79,19 @@ <h1 class="bar">All&nbsp;Classes</h1>
8079
<li><a href="net/authorize/api/contract/v1/CreateCustomerPaymentProfileRequest.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateCustomerPaymentProfileRequest</a></li>
8180
<li><a href="net/authorize/api/contract/v1/CreateCustomerPaymentProfileResponse.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateCustomerPaymentProfileResponse</a></li>
8281
<li><a href="net/authorize/api/controller/CreateCustomerProfileController.html" title="class in net.authorize.api.controller" target="classFrame">CreateCustomerProfileController</a></li>
82+
<li><a href="net/authorize/api/controller/CreateCustomerProfileFromTransactionConroller.html" title="class in net.authorize.api.controller" target="classFrame">CreateCustomerProfileFromTransactionConroller</a></li>
83+
<li><a href="net/authorize/api/contract/v1/CreateCustomerProfileFromTransactionRequest.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateCustomerProfileFromTransactionRequest</a></li>
8384
<li><a href="net/authorize/api/contract/v1/CreateCustomerProfileRequest.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateCustomerProfileRequest</a></li>
8485
<li><a href="net/authorize/api/contract/v1/CreateCustomerProfileResponse.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateCustomerProfileResponse</a></li>
8586
<li><a href="net/authorize/api/contract/v1/CreateCustomerProfileTransactionRequest.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateCustomerProfileTransactionRequest</a></li>
8687
<li><a href="net/authorize/api/contract/v1/CreateCustomerProfileTransactionResponse.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateCustomerProfileTransactionResponse</a></li>
8788
<li><a href="net/authorize/api/controller/CreateCustomerShippingAddressController.html" title="class in net.authorize.api.controller" target="classFrame">CreateCustomerShippingAddressController</a></li>
8889
<li><a href="net/authorize/api/contract/v1/CreateCustomerShippingAddressRequest.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateCustomerShippingAddressRequest</a></li>
8990
<li><a href="net/authorize/api/contract/v1/CreateCustomerShippingAddressResponse.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateCustomerShippingAddressResponse</a></li>
91+
<li><a href="net/authorize/api/controller/CreateFingerPrintController.html" title="class in net.authorize.api.controller" target="classFrame">CreateFingerPrintController</a></li>
92+
<li><a href="net/authorize/api/contract/v1/CreateFingerPrintRequest.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateFingerPrintRequest</a></li>
93+
<li><a href="net/authorize/api/contract/v1/CreateFingerPrintResponse.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateFingerPrintResponse</a></li>
94+
<li><a href="net/authorize/api/contract/v1/CreateProfileResponse.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateProfileResponse</a></li>
9095
<li><a href="net/authorize/api/controller/CreateTransactionController.html" title="class in net.authorize.api.controller" target="classFrame">CreateTransactionController</a></li>
9196
<li><a href="net/authorize/api/contract/v1/CreateTransactionRequest.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateTransactionRequest</a></li>
9297
<li><a href="net/authorize/api/contract/v1/CreateTransactionResponse.html" title="class in net.authorize.api.contract.v1" target="classFrame">CreateTransactionResponse</a></li>
@@ -147,6 +152,8 @@ <h1 class="bar">All&nbsp;Classes</h1>
147152
<li><a href="net/authorize/data/xml/reporting/FDSFilterActionType.html" title="enum in net.authorize.data.xml.reporting" target="classFrame">FDSFilterActionType</a></li>
148153
<li><a href="net/authorize/api/contract/v1/FDSFilterType.html" title="class in net.authorize.api.contract.v1" target="classFrame">FDSFilterType</a></li>
149154
<li><a href="net/authorize/sim/Fingerprint.html" title="class in net.authorize.sim" target="classFrame">Fingerprint</a></li>
155+
<li><a href="net/authorize/api/contract/v1/FingerPrintSupportInformationType.html" title="class in net.authorize.api.contract.v1" target="classFrame">FingerPrintSupportInformationType</a></li>
156+
<li><a href="net/authorize/api/contract/v1/FingerPrintType.html" title="class in net.authorize.api.contract.v1" target="classFrame">FingerPrintType</a></li>
150157
<li><a href="net/authorize/api/controller/GetBatchStatisticsController.html" title="class in net.authorize.api.controller" target="classFrame">GetBatchStatisticsController</a></li>
151158
<li><a href="net/authorize/api/contract/v1/GetBatchStatisticsRequest.html" title="class in net.authorize.api.contract.v1" target="classFrame">GetBatchStatisticsRequest</a></li>
152159
<li><a href="net/authorize/api/contract/v1/GetBatchStatisticsResponse.html" title="class in net.authorize.api.contract.v1" target="classFrame">GetBatchStatisticsResponse</a></li>
@@ -183,7 +190,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
183190
<li><a href="net/authorize/util/HttpCallTask.html" title="class in net.authorize.util" target="classFrame">HttpCallTask</a></li>
184191
<li><a href="net/authorize/util/HttpClient.html" title="class in net.authorize.util" target="classFrame">HttpClient</a></li>
185192
<li><a href="net/authorize/util/HttpUtility.html" title="class in net.authorize.util" target="classFrame">HttpUtility</a></li>
186-
<li><a href="net/authorize/api/controller/base/IApiOperation.html" title="interface in net.authorize.api.controller.base" target="classFrame"><span class="interfaceName">IApiOperation</span></a></li>
193+
<li><a href="net/authorize/api/controller/base/IApiOperation.html" title="interface in net.authorize.api.controller.base" target="classFrame"><i>IApiOperation</i></a></li>
187194
<li><a href="net/authorize/sim/button/ImageButton.html" title="class in net.authorize.sim.button" target="classFrame">ImageButton</a></li>
188195
<li><a href="net/authorize/api/contract/v1/ImpersonationAuthenticationType.html" title="class in net.authorize.api.contract.v1" target="classFrame">ImpersonationAuthenticationType</a></li>
189196
<li><a href="net/authorize/api/controller/IsAliveController.html" title="class in net.authorize.api.controller" target="classFrame">IsAliveController</a></li>
@@ -221,6 +228,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
221228
<li><a href="net/authorize/api/contract/v1/NameAndAddressType.html" title="class in net.authorize.api.contract.v1" target="classFrame">NameAndAddressType</a></li>
222229
<li><a href="net/authorize/data/echeck/NOCCode.html" title="enum in net.authorize.data.echeck" target="classFrame">NOCCode</a></li>
223230
<li><a href="net/authorize/api/contract/v1/ObjectFactory.html" title="class in net.authorize.api.contract.v1" target="classFrame">ObjectFactory</a></li>
231+
<li><a href="net/authorize/api/contract/v1/OpaqueDataType.html" title="class in net.authorize.api.contract.v1" target="classFrame">OpaqueDataType</a></li>
224232
<li><a href="net/authorize/api/contract/v1/OperationType.html" title="enum in net.authorize.api.contract.v1" target="classFrame">OperationType</a></li>
225233
<li><a href="net/authorize/data/Order.html" title="class in net.authorize.data" target="classFrame">Order</a></li>
226234
<li><a href="net/authorize/api/contract/v1/OrderExType.html" title="class in net.authorize.api.contract.v1" target="classFrame">OrderExType</a></li>
@@ -291,6 +299,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
291299
<li><a href="net/authorize/data/arb/SubscriptionStatusType.html" title="enum in net.authorize.data.arb" target="classFrame">SubscriptionStatusType</a></li>
292300
<li><a href="net/authorize/data/arb/SubscriptionUnitType.html" title="enum in net.authorize.data.arb" target="classFrame">SubscriptionUnitType</a></li>
293301
<li><a href="net/authorize/sim/button/TextButton.html" title="class in net.authorize.sim.button" target="classFrame">TextButton</a></li>
302+
<li><a href="net/authorize/api/contract/v1/TokenMaskedType.html" title="class in net.authorize.api.contract.v1" target="classFrame">TokenMaskedType</a></li>
294303
<li><a href="net/authorize/aim/Transaction.html" title="class in net.authorize.aim" target="classFrame">Transaction</a></li>
295304
<li><a href="net/authorize/arb/Transaction.html" title="class in net.authorize.arb" target="classFrame">Transaction</a></li>
296305
<li><a href="net/authorize/cim/Transaction.html" title="class in net.authorize.cim" target="classFrame">Transaction</a></li>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy