Skip to content

Commit 48d10d1

Browse files
authored
Merge pull request #273 from maxmind/fatih/sanbox-info
Add Sandbox information
2 parents f98d2b0 + bb34a60 commit 48d10d1

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,20 @@ Page](https://maxmind.github.io/minfraud-api-java/) under the API tab.
4141
## Usage ##
4242

4343
To use this API, first create a new `WebServiceClient` object. The constructor
44-
takes your MaxMind account ID, license key, and an optional options array as
45-
arguments. For example:
44+
takes your MaxMind account ID and license key as arguments. For example:
4645

4746
```java
4847
WebServiceClient client = new WebServiceClient.Builder(6, "ABCD567890").build();
4948
```
5049

50+
If you would like to use the Sandbox environment, you can use the `host` method
51+
that belongs to the Builder. For example,
52+
53+
```java
54+
WebServiceClient client = new WebServiceClient.Builder(6, "ABCD567890")
55+
.host("sandbox.maxmind.com").build();
56+
```
57+
5158
Then create a new `Transaction` object. This represents the transaction that
5259
you are sending to minFraud. The class is instantiated using an inner builder
5360
class, `Transaction.Builder`. Each builder method takes a corresponding

src/main/java/com/maxmind/minfraud/WebServiceClient.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ public WebServiceClient.Builder disableHttps() {
138138

139139
/**
140140
* @param val The host to use.
141+
* By default, the client connects to the production host. However,
142+
* during testing and development, you can set this option to
143+
* 'sandbox.maxmind.com' to use the Sandbox environment's host. The
144+
* sandbox allows you to experiment with the API without affecting your
145+
* production data.
141146
* @return Builder object
142147
*/
143148
public WebServiceClient.Builder host(String val) {

0 commit comments

Comments
 (0)