checkTransaction method
Implementation
Future<bool> checkTransaction(String reference) async {
assert(inDebugMode = true);
final response = await http.head(
inDebugMode
? Uri.parse(APIUrls.checkDevTransaction(reference))
: Uri.parse(APIUrls.checkTransaction(reference)),
headers: {
'Authorization': 'Bearer ${FlutterPixPagstar.authorization}',
'Content-Type': 'application/json'
},
);
if (response.statusCode == 200) {
return true;
} else {
return false;
}
}