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:

Penko

Active Member
Licensed User
Longtime User
It didn't help unfortunately. Is it possible that any of these libraries is incompatible with ZooZ? (see the attached list).
 

Attachments

  • incompatible.png
    incompatible.png
    18.8 KB · Views: 256

Penko

Active Member
Licensed User
Longtime User
Here is the unfiltered Log:

Please note it doesn't crash immediately. The error is that the Activity is not responding. It crashes randomly(shows SorrY! Activity is not responding).

Starting activity: Intent { cmp=com.kmsengineering.interlex/com.zooz.android.lib.CheckoutActivity (has extras) }


** Activity (payment) Pause, UserClosed = false **


Start ZooZ CheckoutActivity


close_akm, fd=137


Setting rotation to 0, animFlags=1
Config changed: { scale=1.0 imsi=284/5 loc=en_PL touch=3 keys=1/1/2 nav=3/1 orien=1 layout=34 uiMode=17 seq=339}


Unexpected resume of com.kmsengineering.interlex while already resumed in com.kmsengineering.interlex


Layer::requestBuffer(this=0x447ad8), index=1, pid=121, w=480, h=394 success


Is sandbox: true
Layer::requestBuffer(this=0x5c8b88), index=0, pid=121, w=480, h=38 success


Layer::requestBuffer(this=0x447ad8), index=0, pid=121, w=480, h=394 success


Layer::requestBuffer(this=0x447ad8), index=1, pid=121, w=480, h=714 success


Got first part of device signature


Host: https://sandbox.zooz.co


Layer::requestBuffer(this=0x447ad8), index=0, pid=121, w=480, h=714 success
Start verify mandatory inputs.


Finish verify mandatory inputs.
Start onStart
getEntry failing because entryIndex 52 is beyond type entryCount 7


Failure getting entry for 0x7f030034 (t=2 e=52) in package 0: 0x80000001
Error to get string.


android.content.res.Resources$NotFoundException: String resource ID #0x7f030034
at android.content.res.Resources.getText(Resources.java:201)
at android.content.res.Resources.getString(Resources.java:254)
at com.zooz.android.lib.b.y.a(Unknown Source)
at com.zooz.android.lib.b.q.<init>(Unknown Source)
at com.zooz.android.lib.b.<init>(Unknown Source)
at com.zooz.android.lib.CheckoutActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1211)
at android.app.Activity.performStart(Activity.java:3822)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2760)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
at android.app.ActivityThread.access$2300(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Activity com.zooz.android.lib.CheckoutActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4630ead0 that was originally added here


android.view.WindowLeaked: Activity com.zooz.android.lib.CheckoutActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4630ead0 that was originally added here
at android.view.ViewRoot.<init>(ViewRoot.java:251)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.view.Window$LocalWindowManager.addView(Window.java:424)
at android.app.Dialog.show(Dialog.java:241)
at com.zooz.android.lib.b.q.onPreExecute(Unknown Source)
at com.zooz.android.lib.b.onPreExecute(Unknown Source)
at android.os.AsyncTask.execute(AsyncTask.java:391)
at com.zooz.android.lib.CheckoutActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1211)
at android.app.Activity.performStart(Activity.java:3822)


at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2760)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
at android.app.ActivityThread.access$2300(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Start ZooZ CheckoutActivity
Is sandbox: true
Post to ZooZ server...


GC_FOR_MALLOC freed 6899 objects / 445536 bytes in 53ms


Layer::requestBuffer(this=0x5c8b88), index=1, pid=121, w=480, h=38 success


Compass CLOSE


Got first part of device signature


Host: https://sandbox.zooz.co
Start verify mandatory inputs.
Finish verify mandatory inputs.
Start onStart


getEntry failing because entryIndex 52 is beyond type entryCount 7
Failure getting entry for 0x7f030034 (t=2 e=52) in package 0: 0x80000001
Error to get string.
android.content.res.Resources$NotFoundException: String resource ID #0x7f030034
at android.content.res.Resources.getText(Resources.java:201)
at android.content.res.Resources.getString(Resources.java:254)
at com.zooz.android.lib.b.y.a(Unknown Source)
at com.zooz.android.lib.b.q.<init>(Unknown Source)
at com.zooz.android.lib.b.<init>(Unknown Source)
at com.zooz.android.lib.CheckoutActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1211)
at android.app.Activity.performStart(Activity.java:3822)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2760)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4066)
at android.app.ActivityThread.access$2400(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2140)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Post to ZooZ server...


Layer::setBuffers(this=0x53a170), pid=20103, w=1, h=1
Layer::setBuffers(this=0x53a170), pid=20103, w=1, h=1
Layer::requestBuffer(this=0x8ef780), index=0, pid=20103, w=480, h=800 success


Layer::setBuffers(this=0x78ea78), pid=20103, w=1, h=1
Layer::setBuffers(this=0x78ea78), pid=20103, w=1, h=1
Displayed activity com.kmsengineering.interlex/com.zooz.android.lib.CheckoutActivity: 1337 ms (total 1337 ms)


Layer::setBuffers(this=0x6817c0), pid=20103, w=480, h=800
Layer::setBuffers(this=0x6817c0), pid=20103, w=480, h=800
Layer::requestBuffer(this=0x78ea78), index=0, pid=20103, w=432, h=266 success
Layer::requestBuffer(this=0x6817c0), index=0, pid=20103, w=480, h=800 success
Layer::setBuffers(this=0x8c0ef8), pid=20103, w=1, h=1


Layer::setBuffers(this=0x8c0ef8), pid=20103, w=1, h=1
** Activity (payment) Create, isFirst = false **


Mobile Payment Library has been initialized.
** Activity (payment) Resume **


Layer::requestBuffer(this=0x8c0ef8), index=0, pid=20103, w=480, h=800 success
Layer::requestBuffer(this=0x78ea78), index=1, pid=20103, w=432, h=266 success


Layer::requestBuffer(this=0x8c0ef8), index=1, pid=20103, w=480, h=800 success


Layer::requestBuffer(this=0x8c0ef8), index=0, pid=20103, w=480, h=800 success


Layer::requestBuffer(this=0x78ea78), index=0, pid=20103, w=432, h=266 success


Layer::requestBuffer(this=0x78ea78), index=1, pid=20103, w=432, h=266 success


GC_FOR_MALLOC freed 7914 objects / 430296 bytes in 41ms


GC_FOR_MALLOC freed 7741 objects / 466440 bytes in 56ms


GC_FOR_MALLOC freed 1700 objects / 87072 bytes in 48ms


Grow heap (frag case) to 3.185MB for 87396-byte allocation


GC_FOR_MALLOC freed 42 objects / 2448 bytes in 56ms


GC_FOR_MALLOC freed 452 objects / 20400 bytes in 44ms


Grow heap (frag case) to 3.248MB for 87396-byte allocation
GC_FOR_MALLOC freed 7 objects / 296 bytes in 46ms


Layer::requestBuffer(this=0x8c0ef8), index=1, pid=20103, w=480, h=800 success
GC_FOR_MALLOC freed 1187 objects / 65824 bytes in 43ms


Grow heap (frag case) to 3.443MB for 87396-byte allocation
GC_FOR_MALLOC freed 170 objects / 7784 bytes in 43ms


GC_EXTERNAL_ALLOC freed 572 objects / 36832 bytes in 32ms


Freeing OpenSSL session
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x400259f8)


GC_EXPLICIT freed 4911 objects / 222936 bytes in 125ms

What I consider interesting and related:

Activity com.zooz.android.lib.CheckoutActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4630ead0 that was originally added here


android.view.WindowLeaked: Activity com.zooz.android.lib.CheckoutActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4630ead0 that was originally added here
at android.view.ViewRoot.<init>(ViewRoot.java:251)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.view.Window$LocalWindowManager.addView(Window.java:424)
at android.app.Dialog.show(Dialog.java:241)
at com.zooz.android.lib.b.q.onPreExecute(Unknown Source)
at com.zooz.android.lib.b.onPreExecute(Unknown Source)
at android.os.AsyncTask.execute(AsyncTask.java:391)
at com.zooz.android.lib.CheckoutActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1211)
at android.app.Activity.performStart(Activity.java:3822)


at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2760)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
at android.app.ActivityThread.access$2300(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)

getEntry failing because entryIndex 52 is beyond type entryCount 7
Failure getting entry for 0x7f030034 (t=2 e=52) in package 0: 0x80000001
Error to get string.
android.content.res.Resources$NotFoundException: String resource ID #0x7f030034
at android.content.res.Resources.getText(Resources.java:201)
at android.content.res.Resources.getString(Resources.java:254)
at com.zooz.android.lib.b.y.a(Unknown Source)
at com.zooz.android.lib.b.q.<init>(Unknown Source)
at com.zooz.android.lib.b.<init>(Unknown Source)
at com.zooz.android.lib.CheckoutActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1211)
at android.app.Activity.performStart(Activity.java:3822)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2760)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4066)
at android.app.ActivityThread.access$2400(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2140)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Post to ZooZ server...
 
Last edited:

bluedude

Well-Known Member
Licensed User
Longtime User
My feeling says for now it ends here :-( I was working on a very cool concept with a cloud programmable NFC tag that kicks in a payment with information from the tag.

Probably works in a clean project but not in my full project because of the anim folder.

Anyway, patience is probably what we need :)
 

bluedude

Well-Known Member
Licensed User
Longtime User
Either the payment library and drop all the UI components or...

So,

Basically I cannot create a full working piece of software with a combination of the Zooz stuff and all the UI stuff from corwin.

That is a shame but the anim folder seems to break the Zooz library.

I simply cannot create an attractive design without the UI stuff so that is bad luck for the Zooz payment library :-(
 

Sharon

Member
Licensed User
Longtime User
New ZooZ Library including PayPal

Hello all,

Just wanted to update that if you have updated Basic4Android to version 2.0, you can download the ZooZ library, that now also includes PayPal, from our website: www.ZooZ.com
All the previous incompatibilities with additional libraries that contain resources are now solved, thatnks to Erel's great work.

If you need any assistance, you are more than welcome to contact me at sharon@zooz.com

Sharon Ben-Rabi
Mobile Developer @ ZooZ
 

androh

Member
Licensed User
Longtime User
Hi,
I want to try zooz payment to my apps.
But after I added "mplzooz" library, a compile error has been shown.
When I unchecked "libGoogleAnalytics" library, zooz runs without error.

libGoogleAnalytics version: 1.00
MPLZooZ version: 1.10

B4X:
Convert byte code - optimized dex.      Error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/google/android/apps/analytics/AdHitIdGenerator;
   at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
   at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
   at com.android.dx.command.dexer.Main.processClass(Main.java:486)
   at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
   at com.android.dx.command.dexer.Main.access$400(Main.java:67)
   at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
   at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
   at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
   at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
   at com.android.dx.command.dexer.Main.processOne(Main.java:418)
   at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)
   at com.android.dx.command.dexer.Main.run(Main.java:206)
   at com.android.dx.command.dexer.Main.main(Main.java:174)
   at com.android.dx.command.Main.main(Main.java:91)
1 error; aborting
   Standard dexer.
 

Sharon

Member
Licensed User
Longtime User
Hi Hüseyin,

We've identified this issue, and we will release a new version of our library by the end of this week.

Thank you for the heads up,

Sharon Ben-Rabi
Mobile Developer @ ZooZ
 

Krammig

Member
Licensed User
Longtime User
Nice thanks for sharing.

However from what I can see Zooz is very expensive and the Payouts are withheld for 2+ weeks.

cheers
 

pesquera

Active Member
Licensed User
Longtime User
Hello, the download link is broken.. do somebody knows where can I download this library?
 

pesquera

Active Member
Licensed User
Longtime User
hi Rona, I'm reading your documentation right now and like it, is very complete.. will do a try on the nexts days and surely will back.. thank you so much
 

Shay

Well-Known Member
Licensed User
Longtime User
I talk to Zooz support today, they changed the API, and they are dropping support to all old API's (including B4A), in few months
(They said it will not work in few months)
and they provided Java SDK to compile new library from it
which you need to create your own GUI, you can put your logo, etc..
 
Top