You will find the following files in the Kit.
HesabeCrypt.m
Used for encryption & decryption of Request & Response packets. Imports <CommonCrypto/CommonCryptor.h \>
framework of Apple to perform AES Encryption and Decryption in crypt()
function. Use encrypt()
function for encrypting the packet and decrypt()
for decrypting.
PaymentRequest.m
Contains Request properties and is used to set payment request data. Use dictionaryWithPropertiesOfObject()
function to create a Dictionary with Object Properties and Values.
PaymentResponse.m
Contains Response properties and is used to set payment response data. Use initWithDictionary()
function to serialize Response Dictionary into Object.
Constants.h Contains constants for API Endpoint URLs, Access Code, Secret Key, IV, Merchant Code, and Response URLs
HesabeGatewayVC.m
Provides guidance on how to invoke the Checkout API to integrate with Hesabe Payment API 2.0 and redirects to Payment URL. Loads Hesabe Payment Gateway with Payment URL in WKWebView, handles Payment Response and returns to Previous ViewController.
ViewController.m
Calls HesabeGatewayVC, creates and sends PaymentRequest Object, displays Payment Response.