Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FlutterwaveSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'FlutterwaveSDK'
s.version = '1.2.7'
s.version = '1.4.5'
s.summary = 'FlutterwaveSDK'

# This description is used to generate tags and improve search results.
Expand All @@ -25,7 +25,7 @@ Pod::Spec.new do |s|
s.screenshots = 'https://github.com/Flutterwave/FlutterwaveSDK/blob/master/FlutterwaveSDK/Assets/Assets.xcassets/FlutterwaveScreenshot.imageset/FlutterwaveScreenshot.png'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Flutterwave Developers' => '[email protected]' }
s.source = { :git => 'https://github.com/Flutterwave/FlutterwaveSDK.git', :tag => '1.2.7'}
s.source = { :git => 'https://github.com/Flutterwave/FlutterwaveSDK.git', :tag => '1.4.5'}
s.social_media_url = 'https://twitter.com/FlutterwaveEng'

s.ios.deployment_target = '11.0'
Expand Down
4 changes: 3 additions & 1 deletion FlutterwaveSDK/Classes/Model/MpesaVerifyModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct MpesaVerifyResponse: Codable {

// MARK: - MpesaVerifyData
struct MpesaVerifyData: Codable {
let id: Int?
let txRef, flwRef: String?
let amount, chargedAmount: Double?
let appFee: Double?
Expand All @@ -34,6 +35,7 @@ struct MpesaVerifyData: Codable {
let customer: Customer?

enum CodingKeys: String, CodingKey {
case id
case txRef = "tx_ref"
case flwRef = "flw_ref"
case amount
Expand All @@ -48,7 +50,7 @@ struct MpesaVerifyData: Codable {

extension MpesaVerifyData{
func toFlutterResponse() -> FlutterwaveDataResponse{
return FlutterwaveDataResponse(txRef: txRef, flwRef: flwRef, deviceFingerprint: nil, amount: amount, chargedAmount: chargedAmount, appFee: appFee, merchantFee: merchantFee, processorResponse: processorResponse, authModel: nil, currency: currency, ip: ip, narration: narration, status: status, authURL:nil, paymentType: nil, fraudStatus: nil, chargeType: nil, createdAt: nil, plan: nil, id: nil, accountID: nil, customer: customer, card: nil)
return FlutterwaveDataResponse(txRef: txRef, flwRef: flwRef, deviceFingerprint: nil, amount: amount, chargedAmount: chargedAmount, appFee: appFee, merchantFee: merchantFee, processorResponse: processorResponse, authModel: nil, currency: currency, ip: ip, narration: narration, status: status, authURL:nil, paymentType: nil, fraudStatus: nil, chargeType: nil, createdAt: nil, plan: nil, id: id, accountID: nil, customer: customer, card: nil)
}
}

Expand Down
4 changes: 3 additions & 1 deletion FlutterwaveSDK/Classes/Model/PwbtVerify.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct PwbtVerifyResponse: Codable {

// MARK: - PwbtVerifyData
struct PwbtVerifyData: Codable {
let id: Int?
let txRef, flwRef: String?
let amount: Double?
let chargedAmount, appFee: Double?
Expand All @@ -35,6 +36,7 @@ struct PwbtVerifyData: Codable {
let customer: Customer?

enum CodingKeys: String, CodingKey {
case id
case txRef = "tx_ref"
case flwRef = "flw_ref"
case amount
Expand All @@ -52,7 +54,7 @@ struct PwbtVerifyData: Codable {

extension PwbtVerifyData {
func toFlutterResponse() -> FlutterwaveDataResponse{
return FlutterwaveDataResponse(txRef: txRef, flwRef: flwRef, deviceFingerprint: nil, amount: amount, chargedAmount: chargedAmount, appFee: appFee, merchantFee: merchantFee, processorResponse: processorResponse, authModel: authModel, currency: currency, ip: ip, narration: narration, status: status, authURL: nil, paymentType: paymentType, fraudStatus: nil, chargeType: nil, createdAt: nil, plan: nil, id: nil, accountID: nil, customer: customer, card: nil)
return FlutterwaveDataResponse(txRef: txRef, flwRef: flwRef, deviceFingerprint: nil, amount: amount, chargedAmount: chargedAmount, appFee: appFee, merchantFee: merchantFee, processorResponse: processorResponse, authModel: authModel, currency: currency, ip: ip, narration: narration, status: status, authURL: nil, paymentType: paymentType, fraudStatus: nil, chargeType: nil, createdAt: nil, plan: nil, id: id, accountID: nil, customer: customer, card: nil)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@ extension FlutterwavePayViewController : UITextFieldDelegate,CardSelect,UIPicker
item.backgroundColor = .white
}

for (index,_) in (textField.text?.enumerated())!{
pinViewContainer.pins[index].backgroundColor = .gray
}
if ((textField.text?.count)! == 4){
textField.resignFirstResponder()
if let text = textField.text {
for (index, _) in text.prefix(pinViewContainer.pins.count).enumerated() {
pinViewContainer.pins[index].backgroundColor = .gray
}
if text.count == pinViewContainer.pins.count {
textField.resignFirstResponder()
}
}

}

if (textField == debitCardView.cardNumberTextField){
if let count = textField.text?.count {
if count == 6{
flutterwaveCardClient.amount = self.amount
flutterwaveCardClient.cardfirst6 = textField.text

}
if let text = textField.text, text.count == 6 {
flutterwaveCardClient.amount = self.amount
flutterwaveCardClient.cardfirst6 = text
}
}
}
Expand Down