Android Question How to Integrate Payfast or similar payment gateway into App

Jakes72

Active Member
Licensed User
Longtime User
Hi all experts,

I am hoping someone can help me out here. I have used the South African payment gateway 'Payfast' in the past with a website I created by simply directing the user to a payfast server URL with all the required transaction parameters in the query string, the server then sends the user to a payment screen, they enter their card details and once successful it sends the user to a return URL of my choosing on my website so I know the payment has gone through.

Now I am trying to figure out how to do this with my app which is not web based? I know I can use a webview, but my problem is really how do I know if the transaction was successful as I do not have a return URL to send the user to?

Therefore it seems I must use a API instead and then possibly read some return JSON from the server to get the transaction status?
Looking at Payfast documentation I cannot make heads or tails of how to do this and I am not even sure that they have this facility.

Does anyone know a way of doing this for South African transactions? Ie. using Payfast or any other provider?
If so, would you please be kind enough to provide some sample code for this, I would really appreciate that tremendously!

I thank you in advance for your time,

Kind regards,
Jacques.
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Jakes72

Active Member
Licensed User
Longtime User
Hi Don,

Thank you for your reply. The thing is that it seems like their API only supports something called 'subscriptions' (whatever that is), I'm just looking for a facility for someone to make a once off payment. Is this possible Don? Also please could you show me some sample code, I have no cooking clue how to do this.

Regards,
Jacques.
 
Upvote 0

BillMeyer

Well-Known Member
Licensed User
Longtime User
Hi Don,

Thank you for your reply. The thing is that it seems like their API only supports something called 'subscriptions' (whatever that is), I'm just looking for a facility for someone to make a once off payment. Is this possible Don? Also please could you show me some sample code, I have no cooking clue how to do this.

Regards,
Jacques.

I sent you a PM - Will help you - done it before.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

GaryCampbell77

New Member
@BillMeyer
Do you perhaps have a git or repository of some kind for the payfast api integration into the android platform?
Their documentation is a bit sketchy. I would also like to post a public repository of how to accomplish this should you not have one.
Thanks in advance.
 
Upvote 0

GMan556

New Member
Hi @BillMeyer, thanks a million for getting back to me. I do not have anything and looking at the PayFast website for assistance is not really helping. Would appreciate if you could please post a public repository on how to accomplish this. This is the only thing that is holding back the app that we have are trying to launch.
 
Upvote 0
Top