B4A Library Paystack B4A Android Library

Paystack B4A Android Library​

paystack.png

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
phone0.jpeg
phone1.jpeg
phone3.jpeg
phone4.jpg


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: 269
  • Paystack v1.0.zip
    33.3 KB · Views: 279
  • Paystack v1.10.zip
    33.6 KB · Views: 262
  • Paystack Demo v1.10.zip
    3.5 KB · Views: 272
  • Paystack v1.20.zip
    34.9 KB · Views: 260
Last edited:

FrostCodes

Active Member
Licensed User
Longtime 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
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.
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

Paystack B4A Android Library​

View attachment 119408
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)
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
View attachment 119452View attachment 119453View attachment 119454

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.
is it possible to get a success/fail message in the log
 

Kope

Active Member
Licensed User

Paystack B4A Android Library​

View attachment 119408
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
View attachment 119452View attachment 119453View attachment 119454View attachment 121399

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.
Great library.

can we get the b4xpages version or ios version?
 
Top