SSLCOMMERZ Payment Gateway For iOS

Hi guys, today we will learn about how to implement SSLCOMMERZ payment gateway in an iOS application.

Before starting to code first we need to know what a payment gateway is

payment gateway is a merchant service provided by an e-commerce application service provider that authorizes credit card or direct payments processing for e-businesses, online retailers, bricks, and clicks, or traditional brick and mortar.

Thus, its enough for us now. Let’s start by following the instructions below.

STEPS TO INTEGRATE

->Download & Unzip

Step 1: Go to this link https://developer.sslcommerz.com/registration/ and register.

Step 2: Login account with https://sandbox.sslcommerz.com/manage/

Step 3: Go to console and click the developer tab. you can now download iOS SDK file. Now follow the steps.

->Installation Procedure

  1. Unzip the SSLCOMMERZ_iOS_SDK file.
  2. Locate the ‘Universal’ Folder. 
  3. Copy and paste the ‘Universal’ Folder inside your project Directory.
  4. Drag and Drop all files from the copied folder to your Xcode Project.
  5. If the swift project has an Objective-C Bridging Header, Skip this step. Otherwise, Create a .h file named ProjectName-Bridging-Header.h  Make sure to put it in the project directory
  6. Go to Target->Build Settings. Search For Swift compiler and go to the section Swift Compiler –General
  7. Double click the Objective-C bridging Header and add the path for the ProjectName-Bridging-Header.h file.
  8. Go to Target->Build Settings. Search For Library Search Path and add the path for the LibECommerz.a (Make sure the directory search path is selected as ‘recursive’)
    Example
    $(PROJECT_DIR)/Project_NAME/SSLCOMMERZ_Sdk_iOS\ 1.0.5/Universal

Note:

  1. The library is written in Obj-C. Swift Installation and usage guide are also added with SDK.
  2. Test projects for Both Swift and Obj-C are added to the Zip file.
  3. Please note that all amount values should have 2 digits after the decimal. If the amount is 42 BDT, the amount that should go in the amount parameter will be @”42.00”

->Now Add The Below Code In Your Payment Controller.

  1. Include SSLCommerzDelegate  in your Swift class

  2. Create a reference of SSLCommerz in the class.

  3. Initialize the Object and set a delegate

  4. For Payment, Call the following Function With required Parameters

  5. Add The following Delegate function to the class and check transaction status.


     

Note:- Please follow the above step for integrating the SSLCOMMERZ payment gateway in your application if you fill any issue pls comment on the comment section.

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close