iOS Swift
📦 Kit Contents
You will find the following files in the comprehensive iOS Swift 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 and Response data structures
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.
📦 Required Dependencies
CryptoSwift
Contains crypto related functions and helpers for Swift. Used by HesabeCrypt.swift to perform AES Encryption and Decryption.
Alamofire
Swift-based HTTP networking library for iOS and macOS. Handles all API communication with Hesabe servers.