B4A Library Paystack B4A Android Library

Paystack B4A Android Library​


This is a library for easy integration of Paystack with your Android application with B4A. Use this library in your B4A project.

Summarized flow​

  1. Collect user's details such as email & name
  2. Initialize the transaction
  3. Once successful, a prompt will be displayed.

Requirements​

  • Android SDKv16 (Android 4.1 "Jelly Bean") and above
  • JavaObject

Installation & Usage​

B4A​

Download Paystack.jar & Paystack.xml and place in your additional libraries folder​

Enable the Paystack Library in your Libraries Tab​


Assign Paystack Library to a Variable:
Sub Globals
    Dim Pay As Paystack
End Sub

Initialize Paystack Library:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout")
    Pay.Initialize("Pay","pk_test_xxxxx",Me,Activity,False)
End Sub

Add to Manifest:
AddApplicationText(
<meta-data
    android:name="co.paystack.android.PublicKey"
    android:value="pk_test_xxx"/>)

Perform a transaction:
Sub Button1_Click
    Pay.InitializeTransaction("oxxx@gmail.com", 1,"test-1234567890",Pay.CURRENCY_GHS)
End Sub

Demo​

Download/Clone https://github.com/claudeamadu/paystack-b4a/tree/main/Demo


Security​

If you discover any issues, please email obiriclaude@gmail.com.

Contact​

For more enquiries and technical questions regarding the B4A Android PaystackSdk, please post on our issue tracker: https://github.com/claudeamadu/paystack-b4a/issues.

Change log​

Please see CHANGELOG for more information what has changed recently.
 

Attachments

  • Paystack B4A Demo.zip
    3.5 KB · Views: 205
  • Paystack v1.0.zip
    33.3 KB · Views: 199
  • Paystack v1.10.zip
    33.6 KB · Views: 194
  • Paystack Demo v1.10.zip
    3.5 KB · Views: 205
  • Paystack v1.20.zip
    34.9 KB · Views: 190
Last edited:

FrostCodes

Active Member
Licensed User
Thanks for this but based on paystack documentation transaction URLs should be created in the backend, this library would expose your secret key which can be used to perform transactions on your account including money transfers. I think you should either mention that or .... anyways just saying this is a huge security risk to those using this.

Just my thought and it's not meant to offend anyone.
 
Last edited:

Claude Obiri Amadu

Member
Licensed User
Longtime User
Yeah... true. I'm done updating the library with no Secret key required in the Manifest. Will upload later in the day after some finishing touches
 

Kope

Active Member
Licensed User
is it possible to get a success/fail message in the log
 

Kope

Active Member
Licensed User
Great library.

can we get the b4xpages version or ios version?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…