Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Suggested answer

MPOS and EFTPOS device Customization

Posted on by 2,016

 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 ?

  • Suggested answer
    Ramune Profile Picture
    Ramune on at
    RE: MPOS and EFTPOS device Customization

    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans