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:

XverhelstX

Well-Known Member
Licensed User
Longtime User
Nope, it doesn't seems to work.
I also tried to make the jar with MPLZooZ included.
Does some things matter if you change the name of the jar file?

Also, is there a possibility to upgrade the uploadable space of the forums?

Thanks

Tomas
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Nope, it doesn't seems to work.
I tried it and it does work. You should unzip the jar file and add res\values and res\drawables-hdpi to your project. You need to set all the files to be read-only.

The images do show:
SS-2011-12-13_16.45.38.png


However there seems to be a bug in the library itself. When pressing PayPal there is an error:
** Activity (main) Resume **
Activity com.zooz.android.lib.CheckoutActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@408f8310 that was originally added here
android.view.WindowLeaked: Activity com.zooz.android.lib.CheckoutActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@408f8310 that was originally added here
at android.view.ViewRoot.<init>(ViewRoot.java:285)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:152)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
at android.view.Window$LocalWindowManager.addView(Window.java:526)
at android.app.Dialog.show(Dialog.java:269)
at com.zooz.android.lib.b.a.m$a.onPreExecute(Unknown Source)
at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:549)
at android.os.AsyncTask.execute(AsyncTask.java:499)
at com.zooz.android.lib.b.a.m.a(Unknown Source)
at com.zooz.android.lib.e.j.a(Unknown Source)
at com.zooz.android.lib.b.a.n.onClick(Unknown Source)
at android.view.View.performClick(View.java:3122)
at android.view.View$PerformClick.run(View.java:11940)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4028)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)
 

Brad

Active Member
Licensed User
Longtime User
Can this be used in say a point of sale app where each user has their own ZooZ account?
 

bluedude

Well-Known Member
Licensed User
Longtime User
You need to build that yourself and then link the transactions. Would be something like:

- user selects product and your create your internal transaction ID;
- you go into the zooz dialog and you get a Zooz transaction id back;
- link this two and you know who ordered.

So basically you can create your own accounts in your own system. Maybe use a backend like parse.com?
 

ekotler

Member
Licensed User
Longtime User
hi Brad,

Can you please elaborate more about your needs and usage regarding using ZooZ as POS?
Basically, each app in ZooZ is connected to one Merchant Account.
The users that uses your app has their own account (User Account) at ZooZ.
Via our portal, you can view your transactions.
By the way, ZooZ has a wallet application that connect to various physical point of sales, that allow the users to pay through this app.
Currently this app available in Israel only.
Maybe you can do similar usage in other places.
Our app can be downloaded from:
https://market.android.com/details?id=com.tactus.android

Using the app, users can view their transactions history and much more...
 
Last edited:

bluedude

Well-Known Member
Licensed User
Longtime User
Images not showing

Still not able to show the images although I have followed the instructions by Erel.

Any suggestions?

Basically this library isn't usable right now.

Cheers,
 

bluedude

Well-Known Member
Licensed User
Longtime User
Zooz user account

ekotler,

That is kind of confusing information because on the Zooz site there is no mentioning of a user account. Right now it seems you can only signup for a merchant account to get the SDK.

How does your wallet display user related transactions? Is there a hidden API for user stuff somewhere or did you built your own transaction system for internal usage?

"Using the app, users can view their transactions history and much more..."
Not sure where this happens when I look at your site.

Cheers.
 

ekotler

Member
Licensed User
Longtime User
Hi Bluedude,

Let me try make it clearer:

Our SDK is for merchants, currently users do not have access to a web portal, users are actually also do not need to register anywhere, open an account, load money and all other stuff which lower your conversion.
The "User Account" is more of a technical term, which is created seamlessly once user paid at your app.
In your merchant account on our web portal you can view all the transactions that were made for your app, in near future we will enhance the tools and stuff you can do in this portal.
All the above is currently for merchants only.

However you asked about payments at POS.
We as a company also have our own app as separated product, which is currently in limited distribution and not marketed outside of Israel.
This app is a different product of ours and not directly related to the SDK.
This app is for end users and allows these users to pay at a real standard POS (Web or Physical)
One of the things this app can do is to show for the user his history of transactions. Since this app works with our platform as well and thus can show the user also his in-app history that was made from his device for other apps that include our SDK.
I mentioned this app since it is doing in someway what you asked about, meaning allow user with your app to pay at physical POS using our SDK.
I definitely think your idea is great and I just tried to help and give you some reference on it through our app, we will be happy to assist you build your own app for that.



I hope it is more clear now,
Regards
 

bluedude

Well-Known Member
Licensed User
Longtime User
Kind of, not sure why you haven't release user API's then to get to this information from a user perspective. Is that by design or just something that is on the roadmap.

In the meantime,there are still other problems. The images don't display even when put in the correct directories. Basically right now this library isn't usable.

Also looking forward to multi-language support.

Cheers,
 

ekotler

Member
Licensed User
Longtime User
hi bluedude,

The user API is on our roadmap.

Language support is coming in the next version (BTW which languages are you interested in?)

About the images, you need to contact XverhelstX from this forums who wrote the wrapper that uses ZooZ.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Screenshot without images

Erel,

Unfortunately no. None in the emulator, Nexus One or Galaxy Nexus.

Images are in res\drawable readonly.

Cheers,
 

Attachments

  • Screenshot_2011-12-21-17-24-33[1].jpg
    Screenshot_2011-12-21-17-24-33[1].jpg
    6.1 KB · Views: 166

XverhelstX

Well-Known Member
Licensed User
Longtime User
It does work.
I did the same thing wrong too I guess.
Unzip the zoozsdk.jar and copy drawable-hdpi (or something) and values to your res folder.
Next in your drawable-hdpi, ctrl-a, properties, read-only.
The same for in your values.

Tomas
 

bluedude

Well-Known Member
Licensed User
Longtime User
Tomas,

That problem is solved now, mistakenly copied it to the existing drawable and forgot to put the strings.xml on read only.

Now I face a real problem, Zooz says it supports 210 countries but it asks for a 5 digits Zip code. In our country that is not the case, we have 4 digits and two characters.

The coverage FAQ on Zooz says global: ZooZ - FAQ

Anyway, not your problem :)
 

ekotler

Member
Licensed User
Longtime User
Hi bluedude,

I'm glad to hear that the images issue was solved.
Regarding the Zip code, It's a known issue and we already solved it.
We expect to release a new version with that support next week.

For more information you are welcome to contact us directly at: [email protected]

:)
 

bluedude

Well-Known Member
Licensed User
Longtime User
Hi ekotler,

Just did a test purchase and it worked wonderful. Easy and slick.

Now waiting for two things:

- multi language;
- international zip.

BTW, why do you need the zipcode anyway? It is not related to a creditcard because these don't carry address details.

Cheers,
 
Top