> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payaza.africa/llms.txt
> Use this file to discover all available pages before exploring further.

# IOS Swift

> IOS SDK aids in processing payment through the following channels: Cards, Bank and Virtual Transfer..

### Example

To run the example project, clone the repo, and run pod install from the Example directory first.

### Requirements

Payaza SDK is compatible with iOS apps running on iOS 11.0 and above. It requires Xcode 10.0+ to build the source..

### Example

PayAzaSDK is available through [Cocoapods](https://cocoapods.com). To install it, simply add the following line to your Podfile:

```FOR FOR PODFILE theme={null}
  source 'https://github.com/78-Financials/Specs.git'
  source 'https://github.com/CocoaPods/Specs.git'
  pod 'PayAzaSDK'
```

### In your terminal, run

```
pod update && pod install
```

### Usage

There are three steps you would have to complete to set up the SDK and perform transactionStatus

1. Install the SDK as a dependency.
2. Configure the SDK with Merchant Information.
3. Initiate Payment with customer details.

```Request Request Sample theme={null}
import PayazaPod

class ViewController: UIViewController, PayazaCallbackMethods {

private var transactionAmount: Int64?



@objc func showExample(){
  let baseUrl = "https://your-base-url"
  let manager = PayazaManager()
  transactionAmount = 100
  manager.initialize(delegateController: self, viewControler: self)
  manager.PayAzaConfig(merchantKey: "Your Merchant Key Here", merchantName: "Test Merchant", currency: "NGN", firstname: "Firstname",
  lastname: "Lastname", email: "emailAdreess", phone: "Phone", transactionRef: "transactionReference",
  amount: transactionAmount!, isLive: true, baseUrl: baseUrl)  // Set isLive to false during testing and set to true during production
  manager.payNow()
}
 func onPaymentComplete(response: TransactionResponse) {
       print("Successful with (response.reference ?? "Failed to return data")")
 }

func onPaymentCancelled(errorMessage: String) {
   print( errorMessage)
}
}
```

### Arguments

| Parameter         | Description                                                                                                                               | Format  |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| baseUrl           | The URL of the payment service                                                                                                            | string  |
| email             | The email address of the customer.                                                                                                        | string  |
| firstName         | The first name of the customer.                                                                                                           | string  |
| lastName          | The last name of the customer.                                                                                                            | string  |
| phone             | The phone number of the customer. It must be international standard i.e. +2348012345678                                                   | string  |
| transactionref    | This is the transaction reference that you generated for the transaction. This unique and no 2 transactions can have the same reference.. | string  |
| merchantKey       | This is your public API Key.                                                                                                              | string  |
| isLive            | Mode of session (If False, it is in test mode, if True, It is in live mode).                                                              | boolean |
| transactionAmount | The amount that the customer would pay.                                                                                                   | amount  |
| currency          | It refers to the code of the currency.(NGN, USD etc.).                                                                                    | string  |
