Swiftpack.co - faluapp/falu-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by faluapp.
faluapp/falu-ios 1.4.0
The official client for Falu (https://falu.io) on iOS
⭐️ 0
🕓 34 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/faluapp/falu-ios.git", from: "1.4.0")
Falu Logo

Falu iOS SDK

GitHub Workflow Status Language GitHub tag (latest by date)

Falu's iOS SDK simplifies the process of building excellent financial services into iOS applications. The SDK exposes APIs that will enable you to make payments and evaluate your client's credit worth.

Installation

Swift Package Manager

Falu is available on SPM. Add the following to you package.

import PackageDescription

let package = Package(
    dependencies: [
        .package(url: "https://github.com/faluapp/falu-ios", from: 1.0.0)
    ]
)

Getting Started

Setup Guide

Follow our Setup Guide to get started.

Create an instance of Falu

let falu =  Falu("PUBLIC_KEY")

The public key is mandatory. Failing to provide it will result into an Error when interacting with Falu.

Features

Once you have finished the setup process, you can proceed to use the features and functionalities offered by the SDK

Payments

Create a Payment object when initiating payments from a customer. Falu supports several payment methods including MPESA. See How to Authorize Payments and How to Accept Payments for information.

let mpesa = MpesaPaymentRequest(
    phone: "+254722000000",
    reference: "254722000000",
    paybill: true
)

let request = PaymentRequest(amount: 100, currency: "kes", mpesa: mpesa)

falu.createPayment(request: request) { result in
    if case .failure(let error) = result{
        DispatchQueue.main.async {
            // show errors on the UI thread
        }
    } else {
        DispatchQueue.main.async {
            // show on UI thread
        }
    }
}

GitHub

link
Stars: 0
Last commit: Yesterday
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics