Skip to content

Rave is an iOS library for interacting with the Flutterwave payment api.

Notifications You must be signed in to change notification settings

johnsonejezie/Rave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Rave

Rave is an easy to implement library to interact with Flutterwave API. It comes with in-built UI to collect credit card or bank details.


screenshot

screenshot

##Installation Rave supports Swift 3.0+. You can integrate Rave into your project manually. Drag the inner Rave folder into your project. Rave uses TripleDES for encryption and as such requires CommonCrypto. Create header bridge and import CommonCrypto. #import <CommonCrypto/CommonCrypto.h>

Basic usage

let publicKey = "FLWPUBK-bd19817370eb7aa5b89d8ac9f3f28a72"
let secretKey = "FLWSECK-5d413ec5aac3d462cf8b9f0d76113765"
let txRef = "rave-dash-1481777961"
let itemDescription = "Payment for items..."
let payerEmail = "[email protected]"
    
let ravePaymentManager = RavePaymentManager(publicKey, secretKey: secretKey, appName: "Demo", transactionDescription: "Payment for items...", amount: 100, email: "[email protected]", txRef: txRef)
ravePaymentManager?.country = "Nigeria"
ravePaymentManager?.logoImage = UIImage(named: "logo.jpg")
ravePaymentManager?.delegate = self
ravePaymentManager?.show()

Optional properties: You can also set the following optional property.

currency:String //Default: Device Locale currency
country:String  //Default: Device regionCode will be used to get country
firstname:String
lastname:String
IP:String //If not set, the library uses "https://api.ipify.org?format=json" to get IP
narration:String
passcode:String
logoImage: UIImage
meta:[[String:Any]]

Delegate

func ravePaymentManagerDidCancel(_ ravePaymentManager: RavePaymentManager) {
    print("cancel")
}

func ravePaymentManager(_ ravePaymentManager: RavePaymentManager, didCompletePaymentWithResult result: RavePaymentResult) {
   print(result.status)
   print(result.message)
 }

See Demo for more details.

About

Rave is an iOS library for interacting with the Flutterwave payment api.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published