To run the project, clone the repo, and run pod install from the Example directory first.
- Xcode 8
- Minimum deployment target is iOS 9.
pod 'ZainCash'
import ZainCash
let payment = ZainCashPayment()
// Your Wallet secret key
payment.key = "secretsecretsecretsecretsecretsecretsecrets"
// Your merchant id
payment.merchant = "572487bca0a4d6f2688c1ee3"
// Product Ammout
payment.amount = 1000
// hours to expires | default is 4 hours
payment.expiresIn = 2
// Which type of Product
payment.serviceType = "AAA books website"
// Your phone number wallet
payment.msisdn = "9647911111111"
// User order id (optional)
payment.orderId = 1234
// Make transaction here
payment.makePayment { response, error in
// here JSON response of transaction (success or failure)
}
// transaction id, will get it after make payment
payment.transactionID = "42da42da42da42da42da42d"
// check transaction status here
payment.checkTransaction { response, error in
// here JSON response of transaction (success or failure)
}
- Swift Server [ Vapor ]