getToken method
Implementation
Future<AuthRespModel?> getToken({
required DGePayConfigs dGePayConfigs,
}) async {
var headers = {
'Authorization': 'Basic ${getAuthHeader(dGePayConfigs.clientID, dGePayConfigs.clientSecretKey)}'
};
final response = await http.post(
Uri.parse(getBaseUrl(dGePayConfigs.env) + ApiEndpoints.accessToken),
headers: headers);
authRespModel = AuthRespModel.fromJson(jsonDecode(response.body));
return authRespModel;
}