-
Notifications
You must be signed in to change notification settings - Fork 6
Handling Transactions with the SDK
Rotimi Joshua edited this page Sep 10, 2023
·
1 revision
The SDK provides a way to handle transactions using two delegates for callback methods. These delegates allow you to respond to different transaction outcomes within your application code.
// MARK: - Transaction Handling
// This method is called when a transaction is successful
func transactionSuccessful(flwRef: String?, responseData: FlutterwaveDataResponse?) {
print("DATA Returned \(responseData?.flwRef ?? "Failed to return data")")
// You can add additional logic here to handle a successful transaction
}
// This method is called when a transaction fails
func transactionFailed(flwRef: String?, responseData: FlutterwaveDataResponse?) {
print("Failed to return data with FlwRef \(flwRef.orEmpty())")
// You can add additional logic here to handle a failed transaction
}