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:

canalrun

Well-Known Member
Licensed User
Longtime User
Now also tested it on a Nexus One and got a transaction ID back, all seems to work fine.

Now waiting for multi-language support.

Hello,
Thanks again for your reply. I really like the concept of Zooz and I would love to be able to get it to work properly for me.

I am located in the USA – I suspect from earlier posts in this thread that you are located outside of the USA, possibly in Europe.

In response to Sharon's (from Zooz) suggestions, I created a new B4A project, cut and pasted the source code from the mobile payments sample, enabled the 2 MPL libraries, modified and write disabled the XML file, then ran.

First, with the original Zooz jar library. a few seconds after pressing the "Purchase" button, it crashed – force close. Every time.

As per RootSoft's suggestion, I updated the Zooz jar library. This time, for the first purchase, it worked and I received a transaction ID. I wrote the "success" post earlier in this thread.

But, without closing the app, I pressed "Purchase" a second time. I got to the Zooz purchase page, it automatically remembered my previous purchase information, I clicked "Pay Now", and it crashed.

I tried many more times – selecting a new payment method, closing reopening the app, selecting Pay Now, each time it crashed – force close. Looking at the error logs, each time it was a Noll Pointer Error in the Zooz library.

I have no way of knowing for sure, but I have a feeling they are initializing an object using values sent from the app. The values could be in a format that is not understood so that the object is not created. They then try to use the object, but it doesn't exist. Of course, this is just a guess.

I wish I knew of something similar to the Zooz payment concept. I think it is something that there is a great deal of need for. I hope to be able to get it to work reliably.

Thanks,
Barry.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Hi Barry,

I know there is a need for this, that's the reason I asked Xverhelstx to create this based on Zooz. :)

Anyway, tested the way you tested it and indeed I got a force close too. Need to test a few more things because my original tests did not produce this force close.

Will let you know.
 

rmorecki1

Member
Licensed User
Longtime User
Suggestion

Guys, would you like to send us (ZooZ team) your APK so we can try help find the issue?

We are able to create an app with no crushes using this environment.

If yes, Please email to nir@zooz.com
 

buttons

Member
Licensed User
Longtime User
zooz updated SDK

Any chance of incorporating the new SDK into the library zip file as I cannot download it from the Zooz site for some reason. I am unable to test as I always get the force-close after clicking purchase. The mobile payment library initialises, the keyboard pops up, then force close! Thanks.

UPDATE - managed to download it, had to use Firefox!!

This is what I get. Can't scroll the screen, not really sure what I'm expected to do at this point??
 

Attachments

  • zooz.jpg
    zooz.jpg
    15.6 KB · Views: 262
Last edited:

buttons

Member
Licensed User
Longtime User
zooz testing

I unpacked the image files from the updated zooz library, this worked better (see screenshot) though I cannot scroll the screen, it's too big for my humble i5500!

I also find that Paypal doesn't work for me.
 

Attachments

  • zooz.jpg
    zooz.jpg
    11.1 KB · Views: 233
Last edited:

rmorecki1

Member
Licensed User
Longtime User
Update ZooZ version

All please note that we published a new version.

Bug fixes, stabilization and support for more currencies added.
Also added multi language support for some languages,

Enjoy
 

Jaames

Active Member
Licensed User
Longtime User
Please fix this from first post, people often just copy-paste, without looking into code:

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



"CheckoutActivit y" should be "CheckoutActivity"
"PayPalActivit y" should be "PayPalActivity"

regards
 

Jaames

Active Member
Licensed User
Longtime User
I am using ZooZ because i can't make an merchant account on google checkout.. (credit card option is working with me, but not PayPal one in zooz lib) I wish I could turn-off PayPal option from ZooZ library..

For PayPal I am using link in webview.

Thank you Erel for such a effort , besides the fact that you are working and improving B4A you are always here to help us. Thanks for this amazing software.

Sent from my GT-I9000 using Tapatalk
 

Jaames

Active Member
Licensed User
Longtime User
I think that many users will face the same problem as i do (atleast third of us)..

B4A community is growing really fast , most of us is just playing around with this greate software Basic4android. Exploring, learning etc.

Eventually most of us will end up with some great apps made with B4A.

And then, when you are ready to publish your app, disappointment.
Google won't let you to set up merchant account, your country is not supported..

But there is something great like a ZooZ and i think that people who are more advanced , who know java should take some time and make ZooZ and PayPal libraries for this lovely community..

For me ZooZ (at least credit card option) is working well, it is clean, fast and awesome looking ...

Thanks for reading my little sad post :D

cheers!
 

rmorecki1

Member
Licensed User
Longtime User
Message from ZooZ

We will post in a day or two a new package for B4A that will include our latest version and will disable the PayPal option.
The latest version have significant improvements in the UI
fits also tablets. Also some new optional API as requested by some of you.

Thanks James for your recommendation on us.

We are also working to see why PayPal is not working.

Please stay tuned.
 

bluedude

Well-Known Member
Licensed User
Longtime User
Google forcing developer to use in app for virtual goods

Can you tell this community anything on the latest news from Google that virtual goods need to use Google in app billing?

There have been some blogposts on this.
 

rmorecki1

Member
Licensed User
Longtime User
Google Checkout

Yes, regarding bluedude question on Google latest announcement.

Well the fact is that nothing is new.
It is not Google's announcement and they in fact said that nothing changed in their policy for many months and nothing is new from their perspective.

The Google policy is not very clear, but it does say that for virtual goods you must use their checkout and for other goods or services you need to use other checkouts.

From our experience Google does not enforce this rule yet, it is unclear if they can enforce it, when and how.
The rule seems not to be relevant for countries where Google Checkout is not available.

Also their policy is only for the Google Play Market.
There are many other markets where this is not relevant and you can use your own checkout lib.
These markets seem to gain momentum and some are becoming pretty big.


Bottom line:
1) If you sell services or Physical goods - no problem using ZooZ
2) If you sell virtual goods on other market - no problem using ZooZ
3) If you sell virtual goods on Google Play - If you are in a country where Google Checkout is not available, then probably no problem, if you are then so far no problems using ZooZ, but might be changed in the future.
 

rmorecki1

Member
Licensed User
Longtime User
ZooZ Package for B4A

Just wanted to update you all that we (ZooZ) released a new package for B4A.
The new stuff:
1) Ready made wrapper for B4A
2) Wraps our latest SDK version
3) PayPal is disabled and causes no issues with B4A
4) Full documentation

We will have it in our web site in a day or two.
Meanwhile if you want it you can email to me.
 

Jaames

Active Member
Licensed User
Longtime User
I read somewhere on your site that some users said that your library is great, it can be integrated into application in less than an hour, I would add to that, with B4A that can be done in less than 10 minutes :)
New Wrapper has all the functions that are needed for me.
I do not need anything else. This library is right choice for me

Cheers :)
 
Last edited:

bluedude

Well-Known Member
Licensed User
Longtime User
Clear

Clear although I though I heard Google is starting to enforce it. Anyway, I like your library and I will check out the latest version when I create an app. in English (soon).

Cheers,
 

Sharon

Member
Licensed User
Longtime User
The new ZooZ B4A Library

Hello everyone,

You can find the new ZooZ Library for B4A on our website: Click here

The new library also offers to add additional user details to the transactions, as you can see in the user guide attached to the new library download.

We are always available for any questions.

Sharon
Mobile Developer @ ZooZ
 
Top