B4A Library Mobile Payments Library

Hello everyone,

This app lets you add in-app purchases from your Basic4Android application.
You are able to pay with Paypal, creditcard, etc.

The library is from ZooZ, not the one from PayPal!. It is a very to use library with a few functions.
All transactions, etc are done by ZooZ.

ZooZ is a software library for mobile application developers (runs on Android & iOS platforms) that enables to accept payments in your app quickly and easily.
ZooZ handles the entire payment process removing all the headaches from you as a merchant and developer.

Integration is easy and can be completed in 4 easy steps:

Step 1
Download all 4 library files (2 .jars and 2 .xmls), place them in your additional library folder and check them in your Basic4Android library pane at the right side of the IDE.

Step 2
Register at zooz.CO - purchase this domain.

Step 3
Register your app - Your app needs to be registered via this link.
When registering the app you receive a unique "APP KEY", which need to be used in the integration code.

Step 4
Code integration - The attachments includes a working sample file with the functions included.
Fill in your AppKey received from step 3.

B4X:
Dim Payment as MobilePayment

Two events are raised when the transaction succeeds or fails:
B4X:
Sub Payment_Success (TransactionID As String)
   Msgbox("Transaction ID: " & TransactionID, "Transaction Successful.")

End Sub

Sub Payment_Error (ErrorCode As Int, ErrorMessage As String)
   Msgbox("Error in transaction." & CRLF & "Error code: " & ErrorCode & CRLF & ErrorMessage, "Transaction Error")
End Sub

Step 5
Edit your manifest file and add the following 2 functions in your application node.

<!-- ZooZ Activity -->
<activity android:name="com.zooz.android.lib.CheckoutActivity" android:theme="@android:style/Theme.Translucent"/>
<!-- Pay Pal -->
<activity android:name="com.paypal.android.MEP.PayPalActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:configChanges="keyboardHidden|orientation"/>

In project - do not overwrite manifest.

Step 6
Go live - After Integration and testing are completed you can move to production and start accepting payments.
https://app.zooz.co/portal/PortalController?cmd=integration

And that's all.
I haven't been able to test it, as for the first time, you have to enter a creditcard number, and unfortunately, I don't have one.

Have fun!

Tomas

EDIT: I hope the forum max zip upload can be updated some time. :)




DOWNLOAD ATTACHMENTS HERE:
www.rootsoftllc.com/Basic4Android/MobilePaymentLibrary1.0.zip
 
Last edited:

bluedude

Well-Known Member
Licensed User
Longtime User
Standalone it works but in a full project with other libraries there are some problem

Hi,

The payment library works in a clean standalone project but in combination with other libraries I noticed something (see attached screenshot).

It seems your library is picking up resource files from the res/layout folder which in my case has all kinds of files with custom layouts for other libraries. These libraries are in this forum, Quick action menu etc.

In a blank project this does not happen because res/layout is empty.

The screenshot shows that most UI elements point to an xml file for some reason.

Cheers,
 

Attachments

  • Image1.png
    Image1.png
    75.7 KB · Views: 222

Sharon

Member
Licensed User
Longtime User
Hi bluedude,

We managed to reproduce the issue you presented. It seems that when adding an "anim" resource folder, the strings under the "values" folder are not found.

We're still looking into this and will let you know our progress as soon as possible.

Penko, as Erel mentioned, PayPal packs its resource files in a way that cannot be accessed by B4A compilation. The new ZooZ library for B4A does not contain the PayPal option.

Regards,

Sharon
Mobile Developer @ ZooZ
 

Sharon

Member
Licensed User
Longtime User
We are checking it out with the help of Erel, I'll let you know as soon as we have an update.

Sharon
 

bluedude

Well-Known Member
Licensed User
Longtime User
The reason I raised this issue in the first place is because I need the anim folder :) I'm using the AHQuickaction library and that features animations. Cannot do without it because of UI possibilities.

Is it actually solvable?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I checked this issue. I don't see any workaround for it now.

Zooz library references the resources mapped in the internal R file. As we are actually using the resources after they are taken out from the library, the mapping gets changed (when there is a new resource).

I'm afraid that this is a similar issue as the PayPal issue. I hope that it will be fixed in the next version of Basic4android.
 
Top