initPayment method

Future<GoPayResponse> initPayment(
  1. double amount,
  2. String devise,
  3. String telephone,
  4. String myref, {
  5. String? usersId,
})

Initie une demande de paiement Mobile Money (M-Pesa, Airtel Money, Orange Money).

Implementation

Future<GoPayResponse> initPayment(
  double amount,
  String devise,
  String telephone,
  String myref, {
  String? usersId,
}) async {
  final payload = <String, dynamic>{'amount': amount, 'devise': devise, 'telephone': telephone, 'myref': myref};
  if (usersId != null) payload['users_id'] = usersId;
  return _request('POST', '/api/v3/payment/init', payload);
}