Skip to content

Commit

Permalink
Added Originator ConversationID property
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldwight committed Aug 5, 2023
1 parent 8246cd5 commit f739a9c
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions MpesaSdk/Dtos/MpesaTransactionStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ public class MpesaTransactionStatus
[JsonProperty("TransactionID")]
public string TransactionID { get; private set; }

/// <summary>
/// This is a global unique identifier for the transaction request returned by the API proxy upon successful request submission. If you don’t have the M-PESA transaction ID you can use this to query.
/// </summary>
[JsonProperty("OriginatorConversationID")]
public string OriginatorConversationID { get; private set; }

/// <summary>
/// Organization/MSISDN receiving the transaction
/// </summary>
Expand Down Expand Up @@ -111,5 +117,46 @@ public MpesaTransactionStatus(string initiator, string securityCredential, strin
ResultURL = resultUrl;
Occasion = occasion;
}

/// <summary>
/// Mpesa Transaction Status Query data transfer object
/// </summary>
/// <param name="initiator">
/// The name of Initiator to initiating the request.
/// This is the credential/username used to authenticate the transaction request.
/// </param>
/// <param name="securityCredential">
/// Encrypted password for the initiator to authenticate the transaction request.
/// Use <c>Credentials.EncryptPassword</c> method available under MpesaLib.Helpers to encrypt the password.
/// </param>
/// <param name="transactionId">Unique identifier to identify a transaction on M-Pesa. e.g LKXXXX1234</param>
/// <param name="originatorConversationID">Unique identifier to identify without transaction ID. e.g AG_XXXXX_XXX</param>
/// <param name="partyA">Organization/MSISDN receiving the transaction</param>
/// <param name="identifierType">
/// Type of organization receiving the transaction
/// 1 – MSISDN
/// 2 – Till Number
/// 4 – Organization short code
/// </param>
/// <param name="remarks">
/// Comments that are sent along with the transaction
/// </param>
/// <param name="queueTimeoutUrl">The path that stores information of time out transaction. https://ip or domain:port/path</param>
/// <param name="resultUrl">The path that stores information of transaction. https://ip or domain:port/path</param>
/// <param name="occasion">Optional Parameter. (upto 100 characters)</param>
public MpesaTransactionStatus(string initiator, string securityCredential, string transactionId, string originatorConversationID, string partyA, string identifierType, string remarks, string queueTimeoutUrl, string resultUrl, string occasion)
{
Initiator = initiator;
SecurityCredential = securityCredential;
CommandID = Transaction_Type.TransactionStatusQuery;
TransactionID = transactionId;
OriginatorConversationID = originatorConversationID;
PartyA = partyA;
IdentifierType = identifierType;
Remarks = remarks;
QueueTimeOutURL = queueTimeoutUrl;
ResultURL = resultUrl;
Occasion = occasion;
}
}
}

0 comments on commit f739a9c

Please sign in to comment.