iOS - Swift

You will find the following files in the Kit.


HesabeCrypt.swift
Used for encryption & decryption of Request & Response packets. Use encrypt() function for encrypting the packet and decrypt() for decrypting.


HesabeModels.swift
Contains models (structs) for Request, Response


Constants.swift
Contains constants for API Endpoint URLs, Access Code, Secret Key, IV, Merchant Code, and Response URLs


HesabeGatewayVC.swift
Provides guidance on how to invoke the Checkout API to integrate with Hesabe Payment API 2.0 and redirect to Payment URL.


ViewController.swift
Calls HesabeGatewayVC, creates and sends PaymentRequest object, handles Response.


PODS
You will have to include the following PODS:
CryptoSwift
It contains crypto related functions and helpers for Swift implemented in Swift. It is used by HesabeCrypt.swift to perform AES Encryption and Decryption. Visit https://github.com/krzyzanowskim/CryptoSwift/ to learn more about CryptoSwift.


Alamofire
Alamofire is a Swift-based HTTP networking library for iOS and macOS. Visit https://github.com/Alamofire/ to learn more about Alamofire.


Download iOS - Swift Kit