From 51b531c1293d611eeb1bc53f6b25da94082b32ee Mon Sep 17 00:00:00 2001 From: suvaissov Date: Wed, 26 May 2021 13:23:44 +0600 Subject: [PATCH] change gettoken api url --- lib/core/services/ApiService.dart | 7 ++++--- lib/core/services/BankService.dart | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) 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');