...
Checks the connection status with the Moniepoint payment terminal.
SendPaymentRequest(PaymentRequest request)
Sends a payment request to the Moniepoint payment terminal.
Usage Example
Code Block |
---|
using (var moniepointService = new MoniepointCommunicationService("COM1", 9600, 5000)) { if (moniepointService.CheckConnection()) { var paymentRequest = new PaymentRequest { TransactionType = "Sale", Amount = "100.00", MerchantReference = "123456" }; var paymentResponse = moniepointService.SendPaymentRequest(paymentRequest); if (paymentResponse.Status == "success") { var responseData = paymentResponse.ResponseData; var responseObject = paymentResponse.ResponseDataObject as Response; } else { // Handle error or timeout } } } |
Transaction TypesType
1 - Credit Card Purchase
2 - Debit Card Purchase
...
11 - Gift Card Balance
Response CodesCode
00 - Approved or completed successfully
...
Code Block |
---|
public class ResponseObject { public string MaskedPan { get; set; } public string ResponseCode { get; set; } public int Amount { get; set; } public string AuthorizeCode { get; set; } public string RetrievalRefNo { get; set; } public string TerminalID { get; set; } public string TransDate { get; set; } public string TransTime { get; set; } } |