Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,25 +9,34 @@

[Java Quickstart guide](https://developer.squareup.com/docs/sdks/java/quick-start) - The quickstart directory is based off of this document.

[Maven Repository for Square](https://mvnrepository.com/artifact/com.squareup/square) - Where the package files are hosted

[Java SDK Source Code](https://github.com/square/square-java-sdk) - Github repo with sdk source code

## Quickstart instructions

Change into the `quickstart` directory
1. Change into the `quickstart` directory

1. Copy the example config file in `src/main/resources`, and place your `Square Access Token` inside of the new file.

Copy the example config file in `src/main/resources`, and place your `Square Access Token` inside of the new file.
```
$ cp src/main/resources/config.properties.example src/main/resources/config.properties
```

```
$ cp src/main/resources/config.properties.example src/main/resources/config.properties
```
1. Replace `PLACE_VERSION_HERE` with the latest SDK version from [here](https://developer.squareup.com/docs/sdks/java)

Compile the program
```
$ mvn package -DskipTests
```
1. Compile the program
```
$ mvn package -DskipTests
```

Execute the code
```
$ mvn exec:java -Dexec.mainClass="com.square.examples.Quickstart"
```
1. Execute the code
```
$ mvn exec:java -Dexec.mainClass="com.square.examples.Quickstart"
```

You should see your `Square Sandbox Seller account's` location logged in the console.
1. In your console, you should see output similar to this:
```
Location(s) for this account:
LGJ1WWJ8PSV8Z: Default Test Account, 1600 Pennsylvania Ave NW, Washington
```
2 changes: 1 addition & 1 deletion quickstart/pom.xml
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,7 @@
<dependency>
<groupId>com.squareup</groupId>
<artifactId>square</artifactId>
<version>38.1.0.20240320</version>
<version>PLACE_VERSION_HERE</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down