Latest 0.3.9
License MIT
Platforms ios 11.0, requires ARC
Dependencies Alamofire, EVReflection, EVReflection/Alamofire, PayCardsRecognizer, PopupDialog
Frameworks UIKit

PaySky Button SDK

The purpose of this SDK to help programmers to use PaySky payment SDK for IOS .

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.


What things you need to install the software and how to install them

1-COCOPODS installed on your machine   .
3-Create new IOS project in xcode to use SDK or if you have created a project before with swit


A step by step that tell you how to get our SDK in your project.

1- open your xcode project.
2- in your project in Podfile in project level  add :-
pod 'PayButton'

4- Sync your project.(pod install)

### Using SDK

in order to use our SDK you should get merchant id and Terminal id from our company.

1-import PayButton
2 – create a new instance from PayButton:-

let paymentViewController = PaymentViewController ()

you need to just pass some parameters to PayButton class instance :-
1-Merchat id.
2-Terminal id.
3-Payment amount.
4-Currency code [Optional].
5-merchant secure hash.
6-transaction Reference Number.

Note That:-
you shoud keep your secure hash and merchant id and terminal id with encryption before save them in storage if you want.


    paymentViewController.amount =  "amount"  // Amount
    paymentViewController.delegate = self // PaymentDelegate
    paymentViewController.mId = "merchantId" // Merchant id
    paymentViewController.tId = "terminalId" // Terminal  id
    paymentViewController.Currency = "currencyCode" // Currency Code [Optional]
    paymentViewController.refnumber = "reference number""  // unique transaction reference number.
    paymentViewController.Key = "Merchant secure hash"

2 – in order to create transaction call back in deleget PaymentDelegate:-

implete deleget on your ViewController
class ViewController: UIViewController, PaymentDelegate  {
    func finishSdkPayment(_ receipt: TransactionStatusResponse) {



to create transaction in our sdk you just call createTransaction method and pass to it
PaymentTransactionCallback listener to call it after transaction.
this listener has 2 methods:-

1 – finishSdkPayment method
this method called in case transaction success by card payment with SuccessfulCardTransaction object.
SuccessfulCardTransaction object from create transaction listener contains:-
NetworkReference variable that is reference number of transaction.
AuthCode variable
ActionCode variable.
ReceiptNumber variable.
amount variable.

2 – finishSdkPayment method
this method is called if customer make a wallet transaction with SuccessfulWalletTransaction object.
SuccessfulWalletTransaction object from create transaction listener contains:-
NetworkReference variable that is reference number of transaction.
amount variable.


       func finishSdkPayment(_ receipt: TransactionStatusResponse) {
     if receipt.Success   // will be true if transaction success 
      print(receipt.Message) // resonse of error


## Deployment

1-Before deploy your project live ,you should get a merchant id and terminal id from our company .
2-you should keep your merchant id and terminal id secured
in your project, encrypt them before save them in project.

## Built With

* [Alamofire](  
* [EVReflection](  

## Authors

**PaySky Company** - (

## Sample Project

Latest podspec

    "name": "PayButton",
    "version": "0.3.9",
    "summary": "PayButton",
    "description": "PayButton PayButton PayButton",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": ""
    "authors": {
        "payskyCompany": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.3.9"
    "xcconfig": {
        "OTHER_LDFLAGS": "-lz"
    "public_header_files": "PayButton/PayButton-Bridging-Header.h",
    "exclude_files": [
    "platforms": {
        "ios": "11.0"
    "frameworks": "UIKit",
    "dependencies": {
        "Alamofire": [
            "~> 4.8.1"
        "EVReflection": [
            "~> 5.9.0"
        "EVReflection/Alamofire": [
            "~> 5.9.0"
        "PayCardsRecognizer": [
            "~> 1.1.4"
        "PopupDialog": [
            "~> 0.9.2"
    "static_framework": true,
    "requires_arc": true,
    "source_files": "PayButton/**/*.{swift,h,m}",
    "resources": "PayButton/**/*.{png,jpeg,jpg,storyboard,xib,xcassets,lproj,json,plist,strings}",
    "resource_bundles": {
        "PayButton": [

Pin It on Pinterest

Share This