A lighweight payment SDK, for credit card and mobile money payment

CardPaymentSDK

A lighweight payment SDK, for credit card and mobile money payment.

Features

  • Displays checkout page.
  • Listens to callback from checkout page.
  • Option to cancel payment, to dismiss payment dialog from the user.

Screens

SPM

If you have already Swift package set up, add CardPaymentSDK as a dependency to your dependencies in your Package.swift file.

dependencies: [
    .package(url: "https://github.com/Hackman-Adu/cardPaymentSDK.git")
]

Simple example

Present CheckOut Page

Simply, you present CardPaymentView which then loads the payment checkout page. Conform your UIViewController to PaymentResponseDelegate and implement onResponseReceived

var payment:CardPaymentSDK = CardPaymentSDK(vc: self, paymentViewTitle: "Make Payment", paymentViewCancelText: "Cancel")
payment.delegate = self
payment.beginPayment()

Delegate Implementation

    func onResponseReceived(res: PaymentResponse) {
        if res.status == .canceled{
           ///when user dismisses payment dialog
        }
        if res.status == .processing{
           ///when payment is processing
        }
    }

GitHub

View Github