Read More
Read now

SSLCOMMERZ Payment Gateway For iOS

Save

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.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


4 comments

  • Hitendrasinh Gohil
    Could not find module ‘SSLCommerz’ for target ‘x86_64-apple-ios-simulator’; found: arm64, armv7-apple-ios, arm64-apple-ios, arm, armv7
    • jitendra kumar (Moderator)
      Hello,

      Kindly contact us at [email protected]. So that we could assist you in a better way.

      Thanks.

  • rahat
    Can you provide the same tutorial in SWIFT UI? I need it pretty much badly.
    • jitendra kumar (Moderator)
      Hello,

      Kindly contact us at [email protected]. So that we could assist you in a better way.

      Thanks.

  • css.php

    Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

    Deniel Kerr

    Owner and Founder. Opencart

    Talk to Sales
    Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home