This is for general discussions around integrating Paynow into your Java applications
General Discussion - Java Integration
hi there… yes it’s there and active. you probably figured it out since you managed to respond to the first post
Hi Ngoni. The package will soon be published to Central and will be available to install using package managers and build tools like Gradle. The publishing process took longer that we initially expected. But will update this thread as soon as it goes live
Hi @root! You can watch this topic - that will send you an email everytime there’s a new post in this topic.
If you scroll down all the way to the bottom of this page, you should see a button labelled “Normal”. If you click on it, you should get a bunch of options. Click on the one labelled “Watching”
But am concerned with your ecocash payment api .
Seems like it only provides payments to merchants right but not to users like individual users
How come is that so
Hi @khuative. Please advise if you are using the Java SDK from source (https://github.com/paynow/Paynow-Java-SDK), or if you need assistance with troubleshooting your own implementation.
Hi @sinatra. Are you getting any errors when attempting to checkout using Express Checkout?
@paynow i tried to add the dependency using maven it couldnt resolve i then downloaded the source from your github and built my own jar include the jar in my project this is my section of code:
Paynow paynow = new Paynow(integrationId, integration_key);
Payment payment = paynow.createPayment(“Invoice 35”);
// Passing in the name of the item and the price of the item
payment.add(“Bananas”, 2.5);
payment.add(“Apples”, 3.4);
InitResponse response = paynow.send(payment);
and i get this error:
webdev.exceptions.HashMismatchException: null
at webdev.payments.Paynow.init(Paynow.java:283) ~[Paynow-Java-SDK.jar:na]
at webdev.payments.Paynow.send(Paynow.java:154) ~[Paynow-Java-SDK.jar:na]
at com.idrims.service.PaymentService.MakePaymentWithPaynow(PaymentService.java:127) ~[classes/:na]
i then tried to do the iniate payment request using a url
this is my body:
{
“id”: “XXX”,
“reference”: “YUIOPIU”,
“amount”: “90”,
“additionalinfo”: “6451”,
“returnurl”: “some”,
“phone”: “777936191”,
“method”: “ecocash”,
“resulturl”: “some”
}
on xxxx i use my integration key or integration id both give me this error:
status=Error&error=Invalid+Id.
Please advise on what i should do
@khuative We’ve sent you a private message requesting for additional information that’ll help us troubleshoot the issue.
Typically though, an Invalid Id
error means that the ID is not being sent correctly, or is being malformed before being sent to Paynow. Either way, you can respond to the PM with the requested details and we’ll investigate further.
Hi @khuative, when did you download the java-sdk you are using? There was a minor update 4 days ago (from the date of this post 11/Nov/2018) and it may clear up your error. If the source you have is from before then, kindly download the latest version of the source, recompile the jar, import it into your project and try again.
@adrian ok let try to recompile the source and try again.
when can i get the official release of the jar?
I a have trying to initialise an ecocash payment using the endpoint
the full url i have generated is below.
Some how the api keeps on giving me an invalid id responce
i have used both the id and key.
1)https://www.paynow.co.zw/interface/remotetransaction?id= 647e7031-2a34-4572-85ef-25967ee6e8bf&reference=2018-12-17T14:07:09.501&amount=3.0&additionalinfo=none&phone=0774957702&method=ecocash&status=Message
2) https://www.paynow.co.zw/interface/remotetransaction?id=6605&reference=2018-12-17T14:07:09.501&amount=3.0&additionalinfo=none&phone=0774957702&method=ecocash&status=Message
Can anyone point me in the right direction.
The site with these keys has been setup and is live.
Hi @mugadzap .
From your sample code, it seems you are performing GET requests (instead of POSTs) with the values included in as part of the URL. This is incorrect. The fields should be included as part of the POST form data. More importantly though, please always keep your Integration Keys SECRET and never share them publicly. You will need to regenerate a new integration key to invalidate the one you shared here.
Lastly, using the SDK provides easy-to-use functions to perform the initiate transaction and abstracts all the low level tasks like creating the POST object, and hash generation etc. You can read more about it here: https://developers.paynow.co.zw/docs/java_quickstart.html#mobile-transactions
I have been using the sdk the version that is there is corrupt . if you open the folder under .m2 there is only a file
resolver-status.properties.
look @ that postman response.