Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Commerce forum / HardwareStation.Extens...
Commerce forum

HardwareStation.Extension.PaymentSample

(1) ShareShare
ReportReport
Posted on by

Hi,
I'm new to Dynamics.
I'd like create something similar to the 

HardwareStation.Extension.PaymentSample  example. 
I have generated the DLL & dropped it in the RetailServer\WebRoot\bin\ext folder

and referenced the dll in the commerceRuntime.ext.config file.
I get this error when I start ModernPOS: 

The server API has failed.

Where am I going wrong ?
Thank you.

  • Muhammad Azam Khan Profile Picture
    60 on at
    RE: HardwareStation.Extension.PaymentSample

    Hi Jose,

    I worked on EFT project, now I need to implement a payment interface provided by the bank with MPOS D365

    Can you let me know where I need to call Dll which provided by bank , I tried in hardwareextension.paymentsample  It does not work.

  • Community Member Profile Picture
    on at
    RE: HardwareStation.Extension.PaymentSample

    Hi,

    Can you please let me know how to debug the hardware stations. I mean please let us know steps to get in debug mode in hardware stations extension.

  • Community Member Profile Picture
    on at
    RE: HardwareStation.Extension.PaymentSample

    Hi Jose,

    Could you tell me how you implemented cancelling a transaction ?

    Thank you

  • Jose Fuentes Profile Picture
    140 on at
    RE: HardwareStation.Extension.PaymentSample

    Hi all

    I've made the PaymenSample works.

    For testing purpose I've set some values in the TenderInfo and AuthorizePaymentTerminalDeviceResponse objects to process de payment process.

    I did it in the AuthorizePayment function.

    I get the card payment window, when I accept the payment amount the debuger stops on the breakpoint that I've set, at that point I didn't get any error, but when I let the program continues, it shows me an error.

    I've checked the Event Viewer and I get the next error message.

    Unhandled App error: Unable to get property 'TenderTypeId' of undefined or null reference;   StackTrace: ; ErrorUrl: 'ms-appx://microsoft.dynamics.retail.pos/Commerce.Core.js'; ErrorObject: ''

    I've to say the next are the values that I set :

    // Get tender
    TenderInfo maskedTenderInfo = new TenderInfo();
    maskedTenderInfo.CardNumber = "4000";//the card range has been set in the payment methods
    maskedTenderInfo.CardTypeId = 0;
    maskedTenderInfo.ExpirationMonth = 12;
    maskedTenderInfo.ExpirationYear = 2021;
    maskedTenderInfo.IsSwipe = false;
    maskedTenderInfo.TenderId = "3";//I supossed that it could fix the problem but it did not works

    and the PaymentInfo.IsApproved = true;

    I don't know how to avoid that error, if anyone could give any sugestion I would appreciate it.

    Thanks

    Regards.

  • Oksana Kovaliova Profile Picture
    3,597 on at
    RE: HardwareStation.Extension.PaymentSample

    Hi Alex,

    Yes, you are following the right path.

    Did you change D365 HW profile Pin Pad configuration? You should select WindowsDriverand put the name of payment device there. You also need to change WH station ext.cnfig file - to include new payment device there - then PaymentDeviceSample will be called automatically.

    Also make sure in HW station configuration file you have not 'LegacyPaymentAdaptor' enabled - with legacy adaptor PaymentdeviceSample will not work

  • Community Member Profile Picture
    on at
    RE: HardwareStation.Extension.PaymentSample

    HI Jose,

    Could you tell me which files did you drop in the "IPaymentDevice" Folder ?

    Which sample projects did you use to generate these files?

    Thanks

  • Community Member Profile Picture
    on at
    RE: HardwareStation.Extension.PaymentSample

    Hi Oksana,
    I'm using the document you shared with us.
    Looking at this :
    4214.hws_5F00_overview.jpg

    Am I right in thinking to get this model working I only need these 2 projects:
    1) PaymentSdk.sln
    2) HardwareStation.Extension.PaymentSample (part of SampleHardwareStation.sln)


    I added a MyConnectorManager to PaymentSdk.sln. I call the MyConnectorManager in the constructor: SampleConnector().
    Now, I'm working on updating the Authorize function:
    public Response Authorize(Request request, PaymentProperty[] requiredInteractionProperties)

    I'm confused about this:
    I'm using the HardwareStation.Extension.PaymentSample project as it is, is that right ?

    1. The constructor "public PaymentDeviceSample()" is being called.
    2. The "public IEnumerable<Type> SupportedRequestTypes" is being called.
    3. The "public string HandlerName" is being called too.

    I don't understand why the " public Microsoft.Dynamics.Commerce.Runtime.Messages.Response Execute(Microsoft.Dynamics.Commerce.Runtime.Messages.Request request)" is not being called !
    Can anyone help me with the HardwareStation.Extension.PaymentSample:
    What changes do I need to make to it ?
    Why the Execute function is NOT being called ?

    Thank you.

  • Oksana Kovaliova Profile Picture
    3,597 on at
    RE: HardwareStation.Extension.PaymentSample

    Hi Jose,

    Yes, you follow correct path - you need Connector library and Payment device libraries. Both of them go to Hardware Station folder, Payment device library should be in web.config

    Are you working with D365, right?

  • Oksana Kovaliova Profile Picture
    3,597 on at
    RE: HardwareStation.Extension.PaymentSample

    Hi Mohammed, these extensions are for D365. In AX2012 Payment classes should be inside Hardware station solution

  • mohammed.mqi Profile Picture
    2,030 on at
    RE: HardwareStation.Extension.PaymentSample

    me trying to linked EFT device with ax2012 POS

    but i didn't find HardwareStation.Extension.FiscalRegisterSample.csproj or HardwareStation.Extension.PaymentSample

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,296 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,093 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans