change gettoken api url
parent
27d0d6d11d
commit
51b531c129
|
|
@ -26,7 +26,7 @@ class ApiService extends BaseService {
|
||||||
static const host = 'https://kassa.aman.com.kz';
|
static const host = 'https://kassa.aman.com.kz';
|
||||||
static const endpoint = '$host/ru/api/v2';
|
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 NavigatorService _navigatorService = locator<NavigatorService>();
|
||||||
final DialogService _dialogService = locator<DialogService>();
|
final DialogService _dialogService = locator<DialogService>();
|
||||||
|
|
||||||
|
|
@ -71,8 +71,9 @@ class ApiService extends BaseService {
|
||||||
String salt = '!=uF:w1N_Salh?1gVSJ#eGfJYHA(wS4D';
|
String salt = '!=uF:w1N_Salh?1gVSJ#eGfJYHA(wS4D';
|
||||||
String hash = md5.convert(utf8.encode('$login$salt')).toString();
|
String hash = md5.convert(utf8.encode('$login$salt')).toString();
|
||||||
print(hash);
|
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));
|
return HalykPosSession.fromJson(jsonDecode(response));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ import '../models/aman_dao.dart';
|
||||||
|
|
||||||
class BankService extends BaseService {
|
class BankService extends BaseService {
|
||||||
final ApiService _api = locator<ApiService>();
|
final ApiService _api = locator<ApiService>();
|
||||||
static const String _url = 'http://195.200.74.83:5000';
|
|
||||||
final MethodChannel _channel = MethodChannel('channel:com.amanKassa/bank');
|
final MethodChannel _channel = MethodChannel('channel:com.amanKassa/bank');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue