This version now supports bitcode.
- Download the Source code zip (Zooz-iOS zip) and the Zooz-iOS-Frameworks.zip files from https://github.com/Zooz/Zooz-iOS/releases
- Unzip the Zooz-iOS zip file into any location on your drive.
- Drag the Zooz.framework into your Xcode project hierarchy.
- 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. - Add the framework to the Embedded Binaries of the target.
- Add the following framework headers into the “Zooz-iOS” reference file.
#import <Zooz/ZoozController.h> #import <Zooz/ZoozAddPaymentMethodRequest.h> |
---|
- Create the Zooz Controller object:
ZoozController *zooz = [[ZoozController alloc] initWithProgramId:programId.text zoozServerURL:serverUrl.text delegate:self]; |
---|
- 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; |
---|
ZoozAddPaymentMethodRequest *addRequest = [ZoozAddPaymentMethodRequest createRequestWithPaymentToken:paymentToken.text emailAddress:email.text address:nil paymentMethodDetails: card isRememberPaymentMethod:rememberMe.on]; |
---|
[zooz executeZoozRequest:addRequest] |
---|
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:
|
Yes |
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:
|
Yes |
|
|
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 |
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:
|
Yes |
paymentMethodToken |
The paymentMethodToken to remove. |
Yes |
You can view a complete integration code in the sample app that is part of the SDK zip file.