Skip to content

Commit d800521

Browse files
committed
Bug fixes and performance improvements
1 parent d3e35bc commit d800521

File tree

4 files changed

+31
-27
lines changed

4 files changed

+31
-27
lines changed

Example/FlutterwaveSDK/ViewController.swift

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,28 @@ class ViewController: UIViewController, FlutterwavePayProtocol {
3232

3333

3434
@objc func showExample(){
35-
let config = FlutterwaveConfig.sharedConfig()
36-
config.paymentOptionsToExclude = []
37-
config.currencyCode = "NGN" // This is the specified currency to charge in.
38-
config.email = "[USER'S EMAIL]" // This is the email address of the customer
39-
config.isStaging = true // Toggle this for staging and live environment
40-
config.phoneNumber = "[USER'S PHONE_NUMBER]" //Phone number
41-
config.transcationRef = "[TRANSACTION REF]" // This is a unique reference, unique to the particular transaction being carried out. It is generated when it is not provided by the merchant for every transaction.
42-
config.firstName = "[USER'S FIRST NAME]" // This is the customers first name.
43-
config.lastName = "[USER'S SECOND NAME]" //This is the customers last name.
44-
config.meta = [["metaname":"sdk", "metavalue":"ios"]] //This is used to include additional payment information
45-
config.narration = "simplifying payments for endless possibilities"
46-
config.publicKey = "[PUB_KEY]" //Public key
47-
config.encryptionKey = "[ENCRYPTION_KEY]" //Encryption key
48-
config.isPreAuth = false // This should be set to true for preauthoize card transactions
49-
let controller = FlutterwavePayViewController()
50-
let nav = UINavigationController(rootViewController: controller)
51-
controller.amount = "[AMOUNT]" // This is the amount to be charged.
52-
controller.delegate = self
53-
self.present(nav, animated: true)
54-
55-
}
56-
35+
36+
let config = FlutterwaveConfig.sharedConfig()
37+
config.paymentOptionsToExclude = []
38+
config.currencyCode = "NGN" // This is the specified currency to charge in.
39+
config.email = "[USER'S EMAIL]" // This is the email address of the customer
40+
config.isStaging = true // Toggle this for staging and live environment
41+
config.phoneNumber = "[USER'S PHONE_NUMBER]" //Phone number
42+
config.transcationRef = "[TRANSACTION REF]" // This is a unique reference, unique to the particular transaction being carried out. It is generated when it is not provided by the merchant for every transaction.
43+
config.firstName = "[USER'S FIRST NAME]" // This is the customers first name.
44+
config.lastName = "[USER'S SECOND NAME]" //This is the customers last name.
45+
config.meta = [["metaname":"iOS-SDK-v3", "metavalue": MetaValueDetails(paymentDetails: "", recieptId: "")]] //This is used to include additional payment information
46+
config.narration = "simplifying payments for endless possibilities"
47+
config.publicKey = "[PUB_KEY]" //Public key
48+
config.encryptionKey = "[ENCRYPTION_KEY]" //Encryption key
49+
config.isPreAuth = false // This should be set to true for preauthoize card transactions
50+
let controller = FlutterwavePayViewController()
51+
let nav = UINavigationController(rootViewController: controller)
52+
controller.amount = "[AMOUNT]" // This is the amount to be charged.
53+
controller.delegate = self
54+
self.present(nav, animated: true)
55+
56+
}
5757

5858

5959
override func viewDidLoad() {
@@ -65,3 +65,7 @@ class ViewController: UIViewController, FlutterwavePayProtocol {
6565
}
6666

6767

68+
struct MetaValueDetails {
69+
var paymentDetails:String
70+
var recieptId:String
71+
}

FlutterwaveSDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'FlutterwaveSDK'
11-
s.version = '1.3.1'
11+
s.version = '1.3.2'
1212
s.summary = 'FlutterwaveSDK'
1313

1414
# This description is used to generate tags and improve search results.

FlutterwaveSDK/Classes/Config/RaveConfig.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class FlutterwaveConfig {
3030
public var paymentPlan:Int?
3131
public var isPreAuth:Bool = false
3232
public var isPermanent:Bool = true
33-
public var meta:[[String:String]]?
33+
public var meta:[[String:Any]]?
3434
public var subAccounts:[SubAccount]?
3535
public var whiteListedBanksOnly:[String]?
3636
public var paymentOptionsToExclude:[PaymentOption] = []

FlutterwaveSDK/Classes/Utils/RaveConstants.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class RaveConstants: NSObject {
1313

1414
class func baseURL () -> String{
1515
//return "https://ravesandbox.azurewebsites.net"
16-
return "https://rave-api-v2.herokuapp.com"
16+
return "https://api.ravepay.co"
1717
}
1818
class func liveBaseURL() -> String{
1919
// return "https://raveapi.azurewebsites.net"
@@ -25,7 +25,7 @@ class RaveConstants: NSObject {
2525

2626
}
2727

28-
static let flutterWaveVersion = "1.3.1"
28+
static let flutterWaveVersion = "1.3.2"
2929
static let flutterColor = UIColor(hex: "#F5A623")
3030

3131
static let bankStyle = [(code:"044",color:"#143f89",image:"rave_access2"),
@@ -69,7 +69,7 @@ class RaveConstants: NSObject {
6969
"""),
7070
("AIRTEL","","")]
7171

72-
static let zambianNetworks = ["MTN"]
72+
static let zambianNetworks = ["AIRTEL","MTN","ZAMTEL"]
7373

7474

7575

0 commit comments

Comments
 (0)