diff --git a/lib/core/services/ApiService.dart b/lib/core/services/ApiService.dart index 8afbea2..ae1a9bd 100644 --- a/lib/core/services/ApiService.dart +++ b/lib/core/services/ApiService.dart @@ -26,7 +26,7 @@ class ApiService extends BaseService { static const host = 'https://kassa.aman.com.kz'; static const endpoint = '$host/ru/api/v2'; - static const pos_endpoint = '$test_host/api'; + static const pos_endpoint = 'https://partner.aman.com.kz/api'; final NavigatorService _navigatorService = locator(); final DialogService _dialogService = locator(); @@ -71,8 +71,9 @@ class ApiService extends BaseService { String salt = '!=uF:w1N_Salh?1gVSJ#eGfJYHA(wS4D'; String hash = md5.convert(utf8.encode('$login$salt')).toString(); print(hash); - Map requestBody = {'login': login, 'password': password}; - var response = await requestFormData('/getpostoken', requestBody, bodyEntry: true, posEndPoint: true, statusCheck: false); + + Map requestBody = {'login': login, 'hash': hash}; + var response = await requestFormData('/hb/pos/gettoken', requestBody, bodyEntry: true, posEndPoint: true, statusCheck: false); return HalykPosSession.fromJson(jsonDecode(response)); } diff --git a/lib/core/services/BankService.dart b/lib/core/services/BankService.dart index 01a96d0..aa14fce 100644 --- a/lib/core/services/BankService.dart +++ b/lib/core/services/BankService.dart @@ -15,7 +15,6 @@ import '../models/aman_dao.dart'; class BankService extends BaseService { final ApiService _api = locator(); - static const String _url = 'http://195.200.74.83:5000'; final MethodChannel _channel = MethodChannel('channel:com.amanKassa/bank');