filter wallet payment option when user nto logged in
This commit is contained in:
@@ -185,8 +185,15 @@ class PayController extends ChangeNotifier {
|
|||||||
model.paymentProcessors = getFakePaymentProcessors();
|
model.paymentProcessors = getFakePaymentProcessors();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
||||||
|
var labels = ['ECOCASH', 'MPGS'];
|
||||||
|
|
||||||
|
prefs = await SharedPreferences.getInstance();
|
||||||
|
if (prefs.get('token') != null) {
|
||||||
|
labels.add('WALLET');
|
||||||
|
}
|
||||||
|
|
||||||
final response = await http.get(
|
final response = await http.get(
|
||||||
'/public/payment-processors?currency=$currency',
|
'/public/payment-processors?currency=$currency&labelIn=${labels.join(',')}',
|
||||||
);
|
);
|
||||||
final List<dynamic> content = response is List
|
final List<dynamic> content = response is List
|
||||||
? response
|
? response
|
||||||
|
|||||||
Reference in New Issue
Block a user