Skip to content

Commit 0675cba

Browse files
committed
Bug Fixes
1 parent 30241a7 commit 0675cba

File tree

3 files changed

+11
-28
lines changed

3 files changed

+11
-28
lines changed

Example/FlutterwaveSDK/ViewController.swift

+3-26
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,6 @@ class ViewController: UIViewController, FlutterwavePayProtocol {
2020
func tranasctionSuccessful(flwRef: String?, responseData: FlutterwaveDataResponse?) {
2121
print("DATA Returned \(responseData?.flwRef ?? "Failed to return data")")
2222

23-
let vc = SuccessViewController()
24-
let amount: String = String (responseData?.chargedAmount ?? 0.0)
25-
let currency = responseData?.currency ?? ""
26-
let fee: String = String (responseData?.merchantFee ?? 0.0)
27-
vc.fee = fee
28-
vc.amount = (currency + " " + amount)
29-
vc.reference = responseData?.flwRef ?? ""
30-
vc.paymentType = responseData?.paymentType ?? ""
31-
32-
let date = Date()
33-
let format = DateFormatter()
34-
format.dateFormat = "yyyy-MM-dd HH:mm:ss"
35-
let formattedDate = format.string(from: date)
36-
print(formattedDate)
37-
vc.date = formattedDate
38-
39-
if #available(iOS 13.0, *) {
40-
vc.isModalInPresentation = true
41-
} else {
42-
// Fallback on earlier versions
43-
}
44-
self.present(vc, animated: true)
45-
4623
}
4724

4825
func tranasctionFailed(flwRef: String?, responseData: FlutterwaveDataResponse?) {
@@ -57,7 +34,7 @@ class ViewController: UIViewController, FlutterwavePayProtocol {
5734

5835

5936
@objc func showExample(){
60-
37+
6138
let config = FlutterwaveConfig.sharedConfig()
6239
config.paymentOptionsToExclude = []
6340
config.currencyCode = "NGN" // This is the specified currency to charge in.
@@ -77,10 +54,10 @@ class ViewController: UIViewController, FlutterwavePayProtocol {
7754
controller.amount = "[AMOUNT]" // This is the amount to be charged.
7855
controller.delegate = self
7956
self.present(nav, animated: true)
80-
57+
8158
}
8259

83-
60+
8461

8562
override func viewDidLoad() {
8663
super.viewDidLoad()

FlutterwaveSDK/Classes/UI/NewExtraFlutterwave/FlutterWave+UIPickerView.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,15 @@ extension FlutterwavePayViewController : UITextFieldDelegate,CardSelect,UIPicker
2828
@objc func textFieldDidChange(textField: UITextField) {
2929
if (textField == pinViewContainer.hiddenPinTextField){
3030
pinViewContainer.pins.forEach { (item) in
31-
item.backgroundColor = .white
31+
item.backgroundColor = .lightGray.withAlphaComponent(0.8)
3232
}
3333

3434
for (index,_) in (textField.text?.enumerated())!{
3535
pinViewContainer.pins[index].backgroundColor = .gray
36+
// pinViewContainer.pins[index].layer.borderColor = UIColor.black.cgColor
37+
pinViewContainer.pins[index].layer.borderColor = UIColor(hex: "#F5A623").cgColor
38+
pinViewContainer.pins[index].layer.borderWidth = 1.5
39+
3640
}
3741
if ((textField.text?.count)! == 4){
3842
textField.resignFirstResponder()
@@ -52,6 +56,7 @@ extension FlutterwavePayViewController : UITextFieldDelegate,CardSelect,UIPicker
5256

5357

5458

59+
5560
public func textFieldDidBeginEditing(_ textField: UITextField) {
5661
textField.layer.borderWidth = 0
5762
if textField == selectBankAccountView.otherBanksTextField{

FlutterwaveSDK/Classes/UI/Pinview.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88
import UIKit
99

10+
1011
class PinView: UIView {
1112

1213
lazy var titleInfo: UILabel = {
@@ -24,7 +25,7 @@ class PinView: UIView {
2425
view.translatesAutoresizingMaskIntoConstraints = false
2526
view.heightAnchor.constraint(equalToConstant: 40).isActive = true
2627
view.widthAnchor.constraint(equalToConstant: 40).isActive = true
27-
view.backgroundColor = .white
28+
view.backgroundColor = .lightGray
2829
return view
2930
}
3031

0 commit comments

Comments
 (0)