Skip to content

Commit 0bca27b

Browse files
fix(mpesaverifymodel): include transaction id payload
1 parent 783f458 commit 0bca27b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

FlutterwaveSDK/Classes/Model/MpesaVerifyModel.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ struct MpesaVerifyResponse: Codable {
2424

2525
// MARK: - MpesaVerifyData
2626
struct MpesaVerifyData: Codable {
27+
let id: Int?
2728
let txRef, flwRef: String?
2829
let amount, chargedAmount: Double?
2930
let appFee: Double?
@@ -34,6 +35,7 @@ struct MpesaVerifyData: Codable {
3435
let customer: Customer?
3536

3637
enum CodingKeys: String, CodingKey {
38+
case id
3739
case txRef = "tx_ref"
3840
case flwRef = "flw_ref"
3941
case amount
@@ -48,7 +50,7 @@ struct MpesaVerifyData: Codable {
4850

4951
extension MpesaVerifyData{
5052
func toFlutterResponse() -> FlutterwaveDataResponse{
51-
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)
53+
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)
5254
}
5355
}
5456

0 commit comments

Comments
 (0)