createPayment method
Implementation
Future<Map<String, dynamic>> createPayment(
int amount, String description, String statusCallbackUrl) async {
final token = await _getAccessToken();
final response = await _dio.post(
_paymentUrl,
data: {
'monetaryValue': {
'amount': amount.toString(),
'currency': 'IQD',
},
'statusCallbackUrl': statusCallbackUrl,
'description': description,
'expiresIn': 'PT12H',
'refundableFor': '',
},
options: Options(
headers: {'Authorization': 'Bearer $token'},
),
);
return response.data;
}