Giter Site home page Giter Site logo

zooz-ios's Introduction

Zooz Apple iOS SDK – version 1.2

This version now supports bitcode.

Installing the Zooz iOS SDK Framework

  1. Download the Source code zip (Zooz-iOS zip) and the Zooz-iOS-Frameworks.zip files from https://github.com/Zooz/Zooz-iOS/releases
  2. Unzip the Zooz-iOS zip file into any location on your drive.
  3. Drag the Zooz.framework into your Xcode project hierarchy.
  4. Select your project in "Add to targets", and select "Copy.." in the Destination****.
    Note: Make sure to click "Copy", when adding the framework to your project. If "Copy" is not clicked, and then the downloaded SDK is moved, the app build may not work.
  5. Add the framework to the Embedded Binaries of the target.
  6. Add the following framework headers into the “Zooz-iOS” reference file.

#import <Zooz/ZoozController.h>

#import <Zooz/ZoozAddPaymentMethodRequest.h>

Coding

  1. Create the Zooz Controller object:

ZoozController *zooz = [[ZoozController alloc] initWithProgramId:programId.text zoozServerURL:serverUrl.text delegate:self];

  1. Create the "ZoozPaymentMethodDetails" to hold the card details taken from your UI.

ZoozPaymentMethodDetails *card = [[ZoozPaymentMethodDetails alloc] init];

    card.cardNumber = cardNumber.text;

    card.cvvNumber = cvv.text;

    card.expirationMonth = month.text;

    card.expirationYear = year.text;

    card.cardHolderName = cardHolderName.text;

3. Create either an "add card" or a "remove card" request:

ZoozAddPaymentMethodRequest *addRequest = [ZoozAddPaymentMethodRequest createRequestWithPaymentToken:paymentToken.text emailAddress:email.text address:nil paymentMethodDetails: card isRememberPaymentMethod:rememberMe.on];

4. Execute the request:

[zooz executeZoozRequest:addRequest]

5. Implement the delegate methods to receive the success or failure callbacks of adding the card. Note: *The delegate methods are requested in a background thread, not on the main UI thread.*

ControllerConfiguration Class Definition

Attribute Name

Description

Mandatory

zoozServer

The Zooz server URL.

Yes

programId

Program ID as registered in the Zooz Portal.

Yes

paymentToken

A paymentToken is a secure token representing a payment in the Zooz system. You can generate this value any of the following ways:

  • The paymentToken attribute from the openPayment request.
  • The customerToken attribute from the getToken request.

Yes

addPaymentMethod request

Attribute Name

Description

Mandatory

paymentToken

A paymentToken is a secure token representing a payment in the Zooz system. You can generate this value any of the following ways:

  • The paymentToken attribute from the openPayment request.
  • The customerToken attribute from the getToken request.

Yes

email

Card holder email address.

Yes

billingAddress

User billing address.

No

rememberPaymentMethod

To save the payment method for future transactions. Default value is true.

Yes

paymentMethodDetails

cardHolderName

Name on credit card.

Yes

expirationDate

Card expiration date in MM/YYYY format.

Yes

cvvNumber

Credit card CVV number.

Yes

cardNumber

The credit card number.

Yes

userIdNumber

User's national ID number. Should contain 5-12 digits.

No

removePaymentMethod request

Attribute Name

Description

Mandatory

paymentToken

A paymentToken is a secure token representing a payment in the Zooz system. You can generate this value any of the following ways:

  • The paymentToken attribute from the openPayment request.
  • The customerToken attribute from the getToken request.

Yes

paymentMethodToken

The paymentMethodToken to remove.

Yes

Examples

You can view a complete integration code in the sample app that is part of the SDK zip file.

zooz-ios's People

Contributors

jonathanbennett avatar

Watchers

Idan Tovi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.