Skip to content
This repository was archived by the owner on Oct 21, 2021. It is now read-only.

Latest commit

 

History

History
43 lines (28 loc) · 1.67 KB

README.md

File metadata and controls

43 lines (28 loc) · 1.67 KB

Swift Developer Pay API Example

Requirements

Prerequisites

Log into your Clover Sandbox developer account and create an app with the following permissions:

  • Merchant Read
  • Orders Read
  • Orders Write
  • Payments Read
  • Payments Write
  • Process Credit Cards

Install the app to your test merchant and create an OAuth token.

Clone this repo

git clone https://github.com/cloverhackathons/DeveloperPayAPI.git

Setting Up the Script

Open DeveloperPayAPI/java in IntelliJ.

Select Main.java and edit the config variables to include your own test Merchant ID and the OAuth token you created.

Make sure project SDK, language level and JRE are set to Java 8 (because of javax.xml.bind.DatatypeConverter).

Troubleshooting

Remember to set your accessToken with PROCESS_CARDS permission on line 5

401 Unauthorized

  • Make sure you've enabled read/write permissions for your app in Clover's developer dashboard. After enabling, uninstall and then re-install the app on your test merchant. Apps are only granted the permissions requested at the time of installation.

Other common HTTP status codes