Exemple #1
0
 /// <summary>
 /// Makes a Business to Business payment request between Paybill numbers.
 /// </summary>
 /// <param name="businessToBusinessDto">B2B data transfer object.</param>
 /// <param name="accesstoken">Acccesstoken retrieved by the <c>GetAuthTokenAsync</c> method.</param>
 /// <param name="requestEndPoint">Set to <c>RequestEndPoint.BusinessToBusiness</c></param>
 /// <param name="cancellationToken">Cancellation Token</param>
 /// <returns>A JSON string containing data from MPESA API reposnse.</returns>
 public async Task <string> MakeB2BPaymentAsync(BusinessToBusinessDto businessToBusinessDto, string accesstoken, string requestEndPoint, CancellationToken cancellationToken = default)
 {
     return(await MpesaHttpRequest(businessToBusinessDto, accesstoken, requestEndPoint, cancellationToken));
 }
Exemple #2
0
 /// <summary>
 /// Makes a Business to Business payment request between Paybill numbers.
 /// </summary>
 /// <param name="businessToBusinessDto">B2B data transfer object.</param>
 /// <param name="accesstoken">Acccesstoken retrieved by the <c>GetAuthTokenAsync</c> method.</param>
 /// <param name="requestEndPoint">Set to <c>RequestEndPoint.BusinessToBusiness</c></param>
 /// <param name="cancellationToken">Cancellation Token</param>
 /// <returns>A JSON string containing data from MPESA API reposnse.</returns>
 public string MakeB2BPayment(BusinessToBusinessDto businessToBusinessDto, string accesstoken, string requestEndPoint, CancellationToken cancellationToken = default)
 {
     return(MpesaHttpRequest(businessToBusinessDto, accesstoken, requestEndPoint, cancellationToken).GetAwaiter().GetResult());
 }