Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

Zooz Payment JS lib integration problem

Dear All,

I'm straggling with the implementation of Zooz payment JS lib, from zooz developer guide:

Image

on the server side all is working well but the client return an error:

ReferenceError: zoozStartCheckout is not defined

i tried to add the JS script src to the head of the HTML file... no success.
i tried to add the JS script src to the JavaScript itself... no success.
i tried to add the file through "Create from URL"

Image

can anyone help me figure this out please?

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

Zooz Payment JS lib integration problem

It's really strange. It works fine for me.
You can try to insert js code manually. (create empty JS asset and insert code from https://app.zooz.com/mobile/js/zooz-e... in it)

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

Zooz Payment JS lib integration problem

Thx Oleg for your reply!
i managed to add the content of the file using "Create from URL" using your link, now, where did you add the JS reference source line:

Image

thx much once again!

Oleg Danchenkov
Posts: 0
Joined: Tue Apr 30, 2013 5:51 pm

Zooz Payment JS lib integration problem

You dont need this line. JS code is already in your project. And it's available from all pages

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

Zooz Payment JS lib integration problem

then i'm missing something here... just to make sure we are on the same page here, my application is a web app, i'm not using any of zooz's native libs...

so, to recap, new web app project, one page and one JS file with the content of the JS file from your link above, one button that invoke a rest service and get in response the token form zooz followed by this JS code on Success event:

var myToken = localStorage.getItem('ZoozToken');
alert (myToken);
zoozStartCheckout({
token: myToken, // Session token recieved from server
uniqueId: "com.xxxx.yyyy", // unique ID as registered in the developer portal
isSandbox: true, // true = Sandbox environment
returnUrl: "http://50.19.xxx.yyy/ZoozCSSample/Ret...", // return page URL
cancelUrl: "http://50.19.xxx.yyy/ZoozCSSample/Fai..." // cancel page URL
});

and this is the result after i get the token:

Image

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

Zooz Payment JS lib integration problem

this isnt working for me... any thoughts? please....

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Zooz Payment JS lib integration problem

Hi Ram,

Maybe you changed some files on Source tab. Please try deleting them and then clicking "Undo all source changes".

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

Zooz Payment JS lib integration problem

Thx Katya,

unfortunately i dont have any good news, in fact, there's something very disturbing here:

by design, you contact zooz with an amount and in return you get a token, using that token you call "zoozStartCheckout" function, now, i created a rest service that successfully connect to my server and in response i receive the token from zooz via my server

Image

then i need to call to the function "zoozStartCheckout" and pass it the relevant params, so far so good, however, once i put the content of the JS file https://app.zooz.com/mobile/js/zooz-e... into a new JS asset then the service stop working, no error raised, no script errors, no service events fired... nothing... nada :)

needless to say that i cleared all history/cashe/data/etc from browser and still i get the same result.

so... any thoughts? many thanks in advance!!!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Zooz Payment JS lib integration problem

Hi Ram,

Please share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a

Ram
Posts: 0
Joined: Fri Aug 02, 2013 12:15 pm

Zooz Payment JS lib integration problem

i just did, thx much in advance!

Return to “Issues”