change gettoken api url

backend_nfc
suvaissov 2021-05-26 13:23:44 +06:00
parent 27d0d6d11d
commit 51b531c129
2 changed files with 4 additions and 4 deletions

View File

@ -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<NavigatorService>();
final DialogService _dialogService = locator<DialogService>();
@ -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<String, String> requestBody = <String, String>{'login': login, 'password': password};
var response = await requestFormData('/getpostoken', requestBody, bodyEntry: true, posEndPoint: true, statusCheck: false);
Map<String, String> requestBody = <String, String>{'login': login, 'hash': hash};
var response = await requestFormData('/hb/pos/gettoken', requestBody, bodyEntry: true, posEndPoint: true, statusCheck: false);
return HalykPosSession.fromJson(jsonDecode(response));
}

View File

@ -15,7 +15,6 @@ import '../models/aman_dao.dart';
class BankService extends BaseService {
final ApiService _api = locator<ApiService>();
static const String _url = 'http://195.200.74.83:5000';
final MethodChannel _channel = MethodChannel('channel:com.amanKassa/bank');