Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
391fb42
Merge pull request #3 from SeunAdelekan/staging
SeunAdelekan Mar 30, 2017
8000c20
Merge pull request #4 from SeunAdelekan/staging
SeunAdelekan Apr 14, 2017
327a4f6
Merge pull request #5 from SeunAdelekan/staging
SeunAdelekan Apr 14, 2017
cae7cd4
Merge pull request #6 from SeunAdelekan/staging
SeunAdelekan Apr 14, 2017
2a3100f
Merge pull request #7 from SeunAdelekan/staging
SeunAdelekan Apr 14, 2017
2c1f086
Merge pull request #8 from SeunAdelekan/staging
SeunAdelekan Apr 14, 2017
2ad4d56
renamed bacl
SeunAdelekan Apr 14, 2017
c81e7c5
Set up java module system
SeunAdelekan Apr 14, 2017
c85b0b7
Removed files
SeunAdelekan Apr 14, 2017
73a38e9
Modified project structure to fit maven standards
SeunAdelekan Apr 16, 2017
58114a0
Added test class and package to project
SeunAdelekan Apr 16, 2017
7741e55
Corrected improper @author description
SeunAdelekan Apr 16, 2017
d97da37
Added project maven dependencies to pom.xml
SeunAdelekan Apr 16, 2017
9f01358
Update README.md
SeunAdelekan Apr 16, 2017
7303a32
Changed maven source directory, abd added project target files
SeunAdelekan Apr 16, 2017
93c8de2
Merge branch 'master' of github.com:SeunAdelekan/PaystackJava
SeunAdelekan Apr 16, 2017
dd8318d
Removed .DS_Store file
SeunAdelekan Apr 16, 2017
3b24618
Added jUnit as a project dependency
SeunAdelekan Apr 16, 2017
931fb17
Refactored Tests.java to Test.java
SeunAdelekan Apr 16, 2017
7cb5061
Added scm, license information and additional project information to pom
SeunAdelekan Apr 17, 2017
d1a9db9
Update README.md
SeunAdelekan Apr 21, 2017
a45e786
Update README.md
SeunAdelekan Apr 28, 2017
0fc6873
Update README.md
SeunAdelekan Apr 28, 2017
0f5d671
Fixed issue with initialization of secret keys
SeunAdelekan Jul 14, 2017
67b85ff
Avoid protocol_version error by forcing TLSv1.2 on all connections
ibrahimlawal Sep 23, 2017
4ec2461
Update to latest dependency libraries
ibrahimlawal Sep 23, 2017
687950d
[chore] format all files using the netbeans command
ibrahimlawal Sep 23, 2017
bc632d3
Merge pull request #12 from ibrahimlawal/feature/updatedependencies20…
SeunAdelekan Sep 23, 2017
3c15df3
Merge pull request #13 from ibrahimlawal/chore/formatAllFiles
SeunAdelekan Sep 23, 2017
6ae740a
Merge pull request #11 from ibrahimlawal/feature/forcetlsv1.2
SeunAdelekan Sep 23, 2017
f15efe4
chore: update project dependencies
SeunAdelekan Dec 28, 2025
e3fa71d
Merge pull request #17 from SeunAdelekan/chore/update-dependencies
SeunAdelekan Dec 28, 2025
ebef4ca
documentation: update README.md
SeunAdelekan Dec 28, 2025
ad26fa3
refactor: update project to read API key from environment variable an…
SeunAdelekan Dec 28, 2025
21271d8
chore: update pom.xml
SeunAdelekan Dec 28, 2025
25c5bee
Merge pull request #18 from SeunAdelekan/feat/update-api-key-retrieva…
SeunAdelekan Dec 28, 2025
f10f314
chore: update license file
SeunAdelekan Dec 28, 2025
786c38b
Merge pull request #19 from SeunAdelekan/chore/update-license-file
SeunAdelekan Dec 28, 2025
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
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Created by .ignore support plugin (hsz.mobi)
### Example user template template
### Example user template

# IntelliJ project files
.idea
bin
boot
conf
lib
*.iml
.DS_Store
out
gen
9 changes: 0 additions & 9 deletions Keys.json

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The MIT License (MIT)
MIT License

Copyright (c) 2016 Iyanu Adelekan

Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PaystackJava
A Java based API wrapper for the Paystack API
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

# PaystackJava

A Java API wrapper for the facilitation of quick and easy development and integration of Java based applications with the the Paystack API.

Expand Down Expand Up @@ -68,20 +68,7 @@ new Pages().createPage(query);
ApiConnection.shutDown();
```

## NOTE
### PaystackJava utilizes a Keys.json file for the management of api key resources. This file must be placed in your root project directory and has the following structure:
```json
{
"API_KEYS":{
"KEY_IN_USE": "sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"TEST_SECRET_KEY": "sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"TEST_PUBLIC_KEY": "pk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"LIVE_SECRET_KEY": "sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"LIVE_PUBLIC_KEY": "pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
```
### The value attached to KEY_IN_USE is the value used for Authorization by PaystackJava
**NOTE**: PaystackJava reads the API key it uses for authorization via a 'PAYSTACK_API_KEY' environment variable. Ensure you define the variable for your project as necessary.

## Utilities at a glance
### ApiConnection {Class}:
Expand Down Expand Up @@ -144,4 +131,24 @@ ApiConnection.shutDown();
License
----

MIT License
The MIT License (MIT)

Copyright (c) 2016 Iyanu Adelekan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
105 changes: 0 additions & 105 deletions libs/Keys.java

This file was deleted.

Binary file removed libs/jar/PaystackJava.jar
Binary file not shown.
11 changes: 0 additions & 11 deletions libs/jar/setup.txt

This file was deleted.

50 changes: 50 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.iyanuadelekan</groupId>
<artifactId>paystackjava</artifactId>
<packaging>jar</packaging>
<version>2.0.0</version>

<name>PaystackJava</name>
<description>A Java based API wrapper for the Paystack API 💰💸💰💰</description>
<url>https://github.com/SeunAdelekan/PaystackJava</url>

<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>https://github.com/SeunAdelekan/PaystackJava/blob/master/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<connection>scm:git:https://github.com/SeunAdelekan/PaystackJava.git</connection>
<tag>HEAD</tag>
<url>https://github.com/SeunAdelekan/PaystackJava</url>
</scm>

<build>
<sourceDirectory>src</sourceDirectory>
</build>

<dependencies>
<dependency>
<groupId>com.mashape.unirest</groupId>
<artifactId>unirest-java</artifactId>
<version>1.4.9</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20250517</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
/**
* @author Iyanu Adelekan on 17/07/2016.
*/
class Definitions {
public class Definitions {

/**
* The following are URL definitions for the Paystack API.
* All URLs are RESTful endpoints and as such modification of any
* of these URL resources will lead to problems with querying the Paystack API.
* Only modify if you know what you are doing.
* The following are URL definitions for the Paystack API. All URLs are
* RESTful endpoints and as such modification of any of these URL resources
* will lead to problems with querying the Paystack API. Only modify if you
* know what you are doing.
*/

private final static String BASE_API_ENDPOINT = "https://api.paystack.co";

public static final String PAYSTACK_INLINE_PAYSTACK_STANDARD = BASE_API_ENDPOINT + "/transaction/initialize";
Expand Down
Loading