Zooz for Developers

Easy Integration

We value your time and make it our mission to deliver a simple SDK which wraps up everything you need in one place. The Zooz SDK is designed to facilitate all your payment needs with minimal effort. Integrating our code into your app or site should take only a few minutes; take a look below at our sample code for IOS, Android and HTML5.

App Building Platforms

There are many great app building platforms out there. We have packed up plugins and provided documentation for several of the leading development environments such as:

Appcelerator Titanium Phone Gap Basic4Android

Sandbox Environment

We understand you want to fully test your app before moving it to production. The Zooz sandbox environment enables you to test your payment flow as much as you need, free of charge.

Sample Codes

1. Client Side: Call server to open transaction

                <script type="text/javascript">
                    <!-- ... -->
                    zoozStartCheckout({
                        token : tokenFromServer,                    //Token as received by openTrx
                        uniqueId : "com.zooz.mobileweb.sample",     //Unique ID as registered
                        isSandbox : true,                           //Flag for Sandbox environment
                        returnUrl : path + "/return.jsp",           //Return URL
                        cancelUrl : path + "/failed.jsp"            //Cancel URL
                    });
                </script>

            

2. Server Side: Contact Zooz server to open transaction

        public string PostToServer(/* parameters*/)
        {
            // parameters from the client
            string currencyCode = "USD";
            string amount = "0.99";

            // prepare transaction data
            StringBuilder trxData = new StringBuilder();

            // mandatory parameters
            trxData.Append("cmd=openTrx");
            trxData.Append("&amount=").Append(amount);
            trxData.Append("¤cyCode=").Append(currencyCode);

            // response
            string responseStr = ZooZSample.CallZooz(trxData.ToString()); // call zooz server using httpWebRequest
            string response ="";
            OpenTrxResponse openTrxResponse = OpenTrxResponse.create(responseStr);
            JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
            string responseToClient = string.Empty;
            if (openTrxResponse.StatusCode == 0)
            {
                    string sessionToken = openTrxResponse.SessionToken;
                    // Add token to the client response for transaction initialization
                    TokenJson st = new TokenJson();
                    st.token = sessionToken;

					// 2. send response back to page
                    response = jsonSerializer.Serialize(st);
			}
			else if (openTrxResponse.StatusCode != 0 && openTrxResponse.ErrorMessage != null){
                ZoozErrorJson error =new ZoozErrorJson();
                error.errorMessage= "Error to open transaction to Zooz server. " + openTrxResponse.ErrorMessage;
                response = jsonSerializer.Serialize(error);
                System.Diagnostics.Trace.WriteLine(response);
			}
            return response;
        }

            

1. Creating a payment request and opening the payment dialog.

                -(IBAction)pay{
                ZooZ * zooz = [ZooZ sharedInstance];
                zooz.sandbox = YES;//set this if working in Sandbox mode
                ZooZPaymentRequest * req =
                [zooz createPaymentRequestWithTotal:32.1 invoiceRefNumber:@"1234" delegate:self];
                req.currencyCode = @"USD";

                [zooz openPayment:req forAppKey:@"app_id"];

                }
                // invoiceRefNumber is your system accounting invoice number, it is for
                // tracking only and not used by our system.
                // appKey - is the app key you received from us upon registration

            

1. Instantiate new Intent, put extras and start that intent.

                public void onCheckoutClick(View v) {

                    // create new intent CheckoutActivity
                    Intent intent = new Intent(this, CheckoutActivity.class);

                    // supply app-key on the intent
                    intent.putExtra(CheckoutActivity.APP_KEY, "my-app-key");

                    // supply transaction details (amount, currency)
                    intent.putExtra(CheckoutActivity.PAY_AMOUNT, 33.5);
                    intent.putExtra(CheckoutActivity.CURRENCY_CODE, "USD");

                    // supply environment mode (sandbox or production)
                    intent.putExtra(CheckoutActivity.IS_SANDBOX, true);

                    // start CheckoutActivity and wait to the activity result.
                    startActivityForResult(intent, ZooZ_Activity_ID);
                }
            

Still here?