Zilla Checkout iOS SDK
Zilla connect is an easy, fast and secure way for your users to buy now and pay later from your app. It is a drop in framework that allows you host the Zilla checkout application within your iOS application and allow customers make payments using any of the available payment plans.
Getting Started
- Register on your Zilla Merchant dashboard to get your public and secret keys.
Installation
Cocoapods
Zilla Checkout iOS sdk is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'CheckoutiOS'
Requirements
- iOS 11.0 or higher
Then in your code, create a new instance of the Zilla connect Import Checkout SDK
import CheckoutiOS
Methods
There are two ways to make use of the Zilla Checkout Sdk
-
completeExistingOrder()
You can use this if have your own server and choose to create your order from your server (see how) to generate anid
(orderCode
) that you can pass as a parameter to your zilla connect instance. -
createNewOrder()
You can use this if you want to create your order on the fly from your android application. Your order parameters are passed to the zilla checkout instance.
Usage
Completing an existing order
Zilla.shared.completeExistingOrder(withViewController: self, withPublicKey: "" , withOrderId: "" , onSuccess: { result in self.statusLabel.text = "Transaction status: \(result.status)" print(" onSuccess: \(result)") }, onEvent: { eventName,data in })
Creating a new order
let params = TransactionParamsBuilder() .title(title) .amount(10000) .clientOrderReference(<unique_ref>) .redirectUrl("" ) .productCategory("Fashion") .build() Zilla.shared.createNewOrder(withViewController: self, withPublicKey: "" , withTransactionParams: params, onSuccess: { result in print(" onSuccess: \(result)") }, onEvent: { eventName, data in print(" onEvent: \(eventName) data \(data)") })
Public key
Read more about the transaction parameters in this doc
Support
If you're having general difficulties with Zilla Connect or your Sdk integration, please reach out to us at [email protected] or come chat with us on Slack. We're more than happy to help you out with your integration to Zilla.
License
MIT