seunadelekan / paystackjava Goto Github PK
View Code? Open in Web Editor NEWA Java based API wrapper for the Paystack API.
License: MIT License
A Java based API wrapper for the Paystack API.
License: MIT License
@SeunAdelekan please we need your help with this Morufu's issue as reported below:
I am using the java api wrapper library on my project which is maven web application running on glassfish 4.1. When I run this code, I am getting an empty json response.
Transactions transactions = new Transactions();
JSONObject jsonObject = new JSONObject(transactions.
initializeTransaction(AppConstants.getAlphaNumeric(20), "10000000",
"[email protected]", "", AppConstants.getBaseUrl() + "paySuccess/" + appApiCode + "/" + usercode));
AppConstants.logger("Initializing transaction complete");
AppConstants.logger("response:"+jsonObject.toString());
out put:
Info: Initializing transaction
Info: Initializing transaction complete
Info: response{}
When I check on https://dashboard.paystack.co/#/transactions , I can see that the transaction has gone through.
Currently, PaystackJava does not support the use of resources, such as secret keys, that have been defined on a server via environment variables. Adding support for this will be great.
Using test secret key.
Sent request:
{
reference=MOFXw8mDx8Y6PpBAbCVF-1755789cc00,
callback_url=http://127.0.0.1:8080/from-payment-gateway?spec=a73de0d7f9bf7ac152e788d0e5337c3a93e0c7bc5e3fe98aaee1f1a7000bf8bec4a45904876d0a7f1c743d3eb45cc42f4bc9cc2c9cbe68c495ecbbbcd7f894fe&v=1&success=true,
amount=777.00,
[email protected]
}
Received response JSON:
{
"data": {
"reference": "MOFXw8mDx8Y6PpBAbCVF-1755789cc00",
"authorization_url": "https://checkout.paystack.com/ti6crtvtdh4egjv",
"access_code": "ti6crtvtdh4egjv"
},
"message": "Authorization URL created",
"status": true
}
Browsed to the authorization_url
Expected amount: 777
Actual amount: 7.77
I would like to clarify that the amount sent to the Paystack API is considered
to be in kobo
and not that some currency exchange rate is applied to alter it
from 777
to 7.77
.
Thanks
Am using the library for a Java Server Faces (JSF) web application, and the Keys.json file was placed in the web root directory, but it keeps throwing Keys.json File Not Found Exception.
Kindly Please help me out.
Kind reagards,
Olusanya Temidayo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.