web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

MPOS and EFTPOS device Customization

(0) ShareShare
ReportReport
Posted on by 2,050

 i want create payment by my custom EFTPOS device

and this my api code for sending amount and received result 

private void SEND()
        {
            try
            {


                if (terminalSerialPort.IsOpen)
                {
                    terminalSerialPort.Close();
                }

                terminalSerialPort.PortName = cmbSerialPortNames.SelectedValue.ToString();
                terminalSerialPort.BaudRate = 115200;

                terminalSerialPort.Open();

                terminalSerialPort.DataReceived  = new SerialDataReceivedEventHandler(DataReceivedHandler);

                //terminalSerialPort.WriteLine("\x02GETCONFIG0\x03");
                // terminalSerialPort.WriteLine("\x02"  textBox1.Text   "\x03");

                System.Globalization.CultureInfo info = System.Threading.Thread.CurrentThread.CurrentCulture;

                string s = Decimal.Parse(textBox1.Text).ToString("0000000000.00", info).Replace(info.NumberFormat.NumberDecimalSeparator, String.Empty);

                byte[] bytes = System.Text.Encoding.ASCII.GetBytes("0005"   s);
                terminalSerialPort.Write(STX, 0, 1);
                terminalSerialPort.Write(bytes, 0, bytes.Length);
                terminalSerialPort.Write(ETX, 0, 1);




            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }


        }

so i've started worked on PaymentDeviceSample and i'm new in D365 development

where i must include or call my API code in PaymentDeviceSample ?

I have the same question (0)
  • Suggested answer
    Ramune Profile Picture
    Microsoft Employee on at

    Hi Mohammed,

    As this question is customization related, I will leave this for the community to answer. Let's see if anybody has experienced the same and can advise for you anything.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 92 Super User 2026 Season 1

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 71 Super User 2026 Season 1

#3
Sagar Suman Profile Picture

Sagar Suman 56 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans