Exemple #1
0
 /// <summary>
 /// Registers Customer to Business Confirmation and Validation URLs.
 /// </summary>
 /// <param name="customerToBusinessRegisterUrlDto">C2B Register URLs data transfer object.</param>
 /// <param name="accesstoken">Acccesstoken retrieved by the <c>GetAuthTokenAsync</c> method.</param>
 /// <param name="requestEndPoint">Set to <c>RequestEndPoint.RegisterC2BUrl</c></param>
 /// <param name="cancellationToken">Cancellation Token</param>
 /// <returns>A JSON string containing data from MPESA API reposnse.</returns>
 public async Task <string> RegisterC2BUrlAsync(CustomerToBusinessRegisterUrlDto customerToBusinessRegisterUrlDto, string accesstoken, string requestEndPoint, CancellationToken cancellationToken = default)
 {
     return(await MpesaHttpRequest(customerToBusinessRegisterUrlDto, accesstoken, requestEndPoint, cancellationToken));
 }
Exemple #2
0
 /// <summary>
 /// Registers Customer to Business Confirmation and Validation URLs.
 /// </summary>
 /// <param name="customerToBusinessRegisterUrlDto">C2B Register URLs data transfer object.</param>
 /// <param name="accesstoken">Acccesstoken retrieved by the <c>GetAuthTokenAsync</c> method.</param>
 /// <param name="requestEndPoint">Set to <c>RequestEndPoint.RegisterC2BUrl</c></param>
 /// <param name="cancellationToken">Cancellation Token</param>
 /// <returns>A JSON string containing data from MPESA API reposnse.</returns>
 public string RegisterC2BUrl(CustomerToBusinessRegisterUrlDto customerToBusinessRegisterUrlDto, string accesstoken, string requestEndPoint, CancellationToken cancellationToken = default)
 {
     return(MpesaHttpRequest(customerToBusinessRegisterUrlDto, accesstoken, requestEndPoint, cancellationToken).GetAwaiter().GetResult());
 }