usability fixes
This commit is contained in:
@@ -73,7 +73,9 @@ class PayController extends ChangeNotifier {
|
||||
|
||||
// formData can come from a repeat transaction
|
||||
// otherwise build it from elements of the normal flow
|
||||
Future<ApiResponse<Map<String, dynamic>>> doTransaction([tc.FormData? formData]) async {
|
||||
Future<ApiResponse<Map<String, dynamic>>> doTransaction([
|
||||
tc.FormData? formData,
|
||||
]) async {
|
||||
try {
|
||||
model.isLoading = true;
|
||||
notifyListeners();
|
||||
@@ -129,7 +131,9 @@ class PayController extends ChangeNotifier {
|
||||
logger.e(s);
|
||||
model.isLoading = false;
|
||||
notifyListeners();
|
||||
return ApiResponse.failure("Network error. Please try again or contact support");
|
||||
return ApiResponse.failure(
|
||||
"Network error. Please try again or contact support",
|
||||
);
|
||||
} catch (e, s) {
|
||||
logger.e(s);
|
||||
model.isLoading = false;
|
||||
@@ -170,8 +174,9 @@ class PayController extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
|
||||
List<dynamic> response = await http.get('/public/payment-processors');
|
||||
model.paymentProcessors =
|
||||
response.map((e) => PaymentProcessor.fromJson(e)).toList();
|
||||
model.paymentProcessors = response
|
||||
.map((e) => PaymentProcessor.fromJson(e))
|
||||
.toList();
|
||||
|
||||
model.isLoading = false;
|
||||
notifyListeners();
|
||||
|
||||
Reference in New Issue
Block a user