Read More
Read now

PayTabs Payment Gateway Integration in Swift

Save

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

You can read their integration guide https://www.paytabs.com/PayTabs_iOS_SDK_V2.0.pdf

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 authorises 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. Lets start by following the instructions below.

  1. Download the PayTabs iOS SDK  https://www.dropbox.com/s/40jjk40dmnfz79j/PayTabs_Objective%20c.zip?dl=0
  2. Copy or drag drop all the content inside Demo Merchants folder into your project.
  3. Create bridging header or XCode will automatically create it for you when you drag drop content inside Demo Merchants/headerfiles.
  4. Inside the bridging header.h file paste #import “PayTabCardReaderViewController.h”.
  5. Now into you Payment ViewController create an object of PayTabCardReaderViewController like this.

6. Now paste this code inside your payment class

7. Call the function callPaytabPaymentGateway()  into the action of your payment button.

8. After the successful or unsuccessful transaction PayTabs stores the transaction id and response code into your UserDefaults. To check the                         payment status call checkPaymentStatus() function into your payment ViewController’s viewWillAppear function.

9. Finally You have successfully implemented the PayTabs Payment Gateway in your iOS application.

Note:-

  1. PayTabs SDK does’t support XCode simulator.
  2. You need to disable bitcode from build settings of your project target .

 

 

   

 

. . .

Leave a Comment

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


1 comments

  • Akash
    i have error when i create object of PayTabCardReaderViewController() this controller.
    Error :
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
  • 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