Skip to content

Commit 49be447

Browse files
committed
Just some fresh paint and tune-ups. No bigs.
1 parent da74938 commit 49be447

File tree

6 files changed

+56
-51
lines changed

6 files changed

+56
-51
lines changed

Diff for: Example/FlutterwaveSDK.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@
532532
INFOPLIST_FILE = FlutterwaveSDK/Info.plist;
533533
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
534534
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
535-
MARKETING_VERSION = 1.3.5;
535+
MARKETING_VERSION = 1.3.6;
536536
MODULE_NAME = ExampleApp;
537537
PRODUCT_BUNDLE_IDENTIFIER = com.demo.paypal.flutterwave;
538538
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -555,7 +555,7 @@
555555
INFOPLIST_FILE = FlutterwaveSDK/Info.plist;
556556
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
557557
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
558-
MARKETING_VERSION = 1.3.5;
558+
MARKETING_VERSION = 1.3.6;
559559
MODULE_NAME = ExampleApp;
560560
PRODUCT_BUNDLE_IDENTIFIER = com.demo.paypal.flutterwave;
561561
PRODUCT_NAME = "$(TARGET_NAME)";

Diff for: Example/FlutterwaveSDK/ViewController.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ViewController: UIViewController, FlutterwavePayProtocol {
4343
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.
4444
config.firstName = "[USER'S FIRST NAME]" // This is the customers first name.
4545
config.lastName = "[USER'S SECOND NAME]" //This is the customers last name.
46-
config.meta = [["metavalue":["paymentDetails":"", "recieptId":""] , "metaname": "iOS-SDK-v3"]] //This is used to include additional payment information
46+
config.meta = [["metaname":"sdk", "metavalue":"ios"]] //This is used to include additional payment information
4747
config.narration = "simplifying payments for endless possibilities"
4848
config.publicKey = "[PUB_KEY]" //Public key
4949
config.encryptionKey = "[ENCRYPTION_KEY]" //Encryption key
@@ -55,6 +55,9 @@ class ViewController: UIViewController, FlutterwavePayProtocol {
5555
self.present(nav, animated: true)
5656

5757
}
58+
59+
60+
5861

5962

6063
override func viewDidLoad() {

Diff for: FlutterwaveSDK.podspec

+1-1
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.5'
11+
s.version = '1.3.6'
1212
s.summary = 'FlutterwaveSDK'
1313

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

Diff for: FlutterwaveSDK/Classes/App/RaveCardClient.swift

+11-13
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// RaveCardClient.swift
33
// GetBarter
44
//
5-
// Created by Olusegun Solaja on 14/08/2018.
6-
// Copyright © 2018 Olusegun Solaja. All rights reserved.
7-
//
5+
// Created by texyz on 10/02/2020.
6+
// Copyright (c) 2020 texyz. All rights reserved.
87

98
import Foundation
109
import UIKit
@@ -77,13 +76,14 @@ class FlutterwaveCardClient{
7776
"amount":amount ?? "",
7877
"firstname":FlutterwaveConfig.sharedConfig().firstName ?? "",
7978
"lastname": FlutterwaveConfig.sharedConfig().lastName ?? "",
79+
"otp":"123456",
8080
"txRef": FlutterwaveConfig.sharedConfig().transcationRef!]
8181
if let saveCard = isSaveCardCharge{
8282
param.merge(["is_saved_card_charge":saveCard])
8383
}
84-
if let _otp = otp{
85-
param.merge(["otp":_otp])
86-
}
84+
// if let _otp = otp{
85+
// param.merge(["otp":_otp])
86+
// }
8787
if let saveCardType = saveCardPayment{
8888
param.merge(["payment_type":saveCardType])
8989
}
@@ -135,22 +135,20 @@ class FlutterwaveCardClient{
135135

136136
let jsonString = param.jsonStringify()
137137

138+
print("This is the payload before encryption\(jsonString)")
139+
138140
let secret = FlutterwaveConfig.sharedConfig().encryptionKey!
139141
let data = TripleDES.encrypt(string: jsonString, key:secret)
140142
let base64String = data?.base64EncodedString()
141143

142144

143-
// let reqbody = [
144-
// "PBFPubKey": pubkey,
145-
// "client": base64String!, // Encrypted $data payload here.
146-
// "alg": "3DES-24"
147-
// ]
148-
// print("first-of-all")
149-
// print(reqbody)
150145
CardViewModel.sharedViewModel.chargeSavedCard(client: base64String!)
146+
151147

152148
}
153149
}
150+
151+
154152
//MARK: Charge Card
155153
public func chargeCard(replaceData:Bool = false){
156154
if let pubkey = FlutterwaveConfig.sharedConfig().publicKey{

Diff for: FlutterwaveSDK/Classes/UI/NewExtraFlutterwave/FlutterWave+UIPickerView.swift

+37-33
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ extension FlutterwavePayViewController : UITextFieldDelegate,CardSelect,UIPicker
1616

1717
func cardSelected(card: SavedCard?) {
1818
flutterwaveCardClient.selectedCard = card
19-
if let card = flutterwaveCardClient.selectedCard{
20-
//LoadingHUD.shared().show()
21-
CardViewModel.sharedViewModel.sendCardOtp(cardHash: card.cardHash ?? "")
22-
// flutterwaveCardClient.sendOTP(card: card)
23-
}
19+
// if let card = flutterwaveCardClient.selectedCard{
20+
// CardViewModel.sharedViewModel.sendCardOtp(cardHash: card.cardHash ?? "")
21+
LoadingHUD.shared().show()
22+
// flutterwaveCardClient.otp = "12345"
23+
flutterwaveCardClient.isSaveCardCharge = "1"
24+
flutterwaveCardClient.saveCardPayment = "saved-card"
25+
flutterwaveCardClient.amount = self.amount
26+
flutterwaveCardClient.saveCardCharge()
27+
// }
2428
}
2529

2630

@@ -264,27 +268,27 @@ extension FlutterwavePayViewController : UITextFieldDelegate,CardSelect,UIPicker
264268
}
265269

266270
func showOTP(message:String, flwRef:String, otpType:OTPType){
267-
self.otpContentContainer.isHidden = false
268-
self.accountOtpContentContainer.isHidden = false
271+
// self.otpContentContainer.isHidden = true
272+
// self.accountOtpContentContainer.isHidden = true
269273
switch otpType {
270274
case .savedCard:
271-
272-
otpContentContainer.alpha = 0
273-
otpContentContainer.otpMessage.text = message
274-
otpContentContainer.otpButton.removeTarget(self, action: #selector(accountOTPButtonTapped), for: .touchUpInside)
275-
otpContentContainer.otpButton.removeTarget(self, action: #selector(cardOTPButtonTapped), for: .touchUpInside)
276-
otpContentContainer.otpButton.addTarget(self, action: #selector(saveCardOTPButtonTapped), for: .touchUpInside)
277-
278-
UIView.animate(withDuration: 0.6, animations: {
279-
self.otpContentContainer.alpha = 1
280-
self.pinViewContainer.alpha = 0
281-
self.debitCardView.alpha = 0
282-
self.saveCardContainer.alpha = 0
283-
}) { (success) in
284-
self.pinViewContainer.isHidden = true
285-
self.debitCardView.isHidden = true
286-
self.saveCardContainer.isHidden = true
287-
}
275+
print("")
276+
// otpContentContainer.alpha = 0
277+
// otpContentContainer.otpMessage.text = message
278+
// otpContentContainer.otpButton.removeTarget(self, action: #selector(accountOTPButtonTapped), for: .touchUpInside)
279+
// otpContentContainer.otpButton.removeTarget(self, action: #selector(cardOTPButtonTapped), for: .touchUpInside)
280+
// otpContentContainer.otpButton.addTarget(self, action: #selector(saveCardOTPButtonTapped), for: .touchUpInside)
281+
//
282+
// UIView.animate(withDuration: 0.6, animations: {
283+
// self.otpContentContainer.alpha = 1
284+
// self.pinViewContainer.alpha = 0
285+
// self.debitCardView.alpha = 0
286+
// self.saveCardContainer.alpha = 0
287+
// }) { (success) in
288+
// self.pinViewContainer.isHidden = true
289+
// self.debitCardView.isHidden = true
290+
// self.saveCardContainer.isHidden = true
291+
// }
288292

289293
case .card:
290294

@@ -346,15 +350,15 @@ extension FlutterwavePayViewController : UITextFieldDelegate,CardSelect,UIPicker
346350
}
347351

348352
@objc func saveCardOTPButtonTapped(){
349-
self.view.endEditing(true)
350-
guard let otp = otpContentContainer.otpTextField.text, otp != "" else {
351-
return
352-
}
353-
// LoadingHUD.shared().show()
354-
flutterwaveCardClient.otp = otp
355-
flutterwaveCardClient.isSaveCardCharge = "1"
356-
flutterwaveCardClient.saveCardPayment = "saved-card"
357-
flutterwaveCardClient.amount = self.amount
353+
// self.view.endEditing(true)
354+
// guard let otp = otpContentContainer.otpTextField.text, otp != "" else {
355+
// return
356+
// }
357+
// // LoadingHUD.shared().show()
358+
//// flutterwaveCardClient.otp = otp
359+
// flutterwaveCardClient.isSaveCardCharge = "1"
360+
// flutterwaveCardClient.saveCardPayment = "saved-card"
361+
// flutterwaveCardClient.amount = self.amount
358362
// flutterwaveCardClient.saveCardCharge()
359363
}
360364
@objc func pinContinueButtonTapped(){

Diff for: FlutterwaveSDK/Classes/Utils/RaveConstants.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class RaveConstants: NSObject {
2525

2626
}
2727

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

3131
static let bankStyle = [(code:"044",color:"#143f89",image:"rave_access2"),

0 commit comments

Comments
 (0)