Need options for custom Windows web service that can receive requests from PHP on Linux

Posted on 2014-02-21
Last Modified: 2016-02-26
I typically work on Windows development using Visual Studio and Microsoft Dynamics GP.

I have a client that would like to integrate their operational system (order taking and CC capture) with Dynamics GP.

However, their operational system is a custom web site that uses PHP on Linux.  My understanding is that PHP on Linux cannot call COM, so I'm now thinking that we will need to have a Windows web service that will accept requests from the PHP / Linux web site.

The Windows web service will initially only need to support two different calls from the Linux machine, but they may add a few more over time.  I'm thinking that the Windows web service will simply be a wrapper for the underlying Dynamics GP APIs that need to be called.

While I've done development to make calls to and integrate with an existing web services, I have not developed custom web services from scratch.  I can spell REST and SOAP, but that's about it.  

While I'm assuming it's not too hard to open Visual Studio and develop a basic web service to support the two or three integration calls we need, because this involves credit card data, the solution will need to have strong authentication and security between the Linux and Windows environments, preferably using a standards based implementation / protocols, etc.  And I'm concerned about possible compatibility issues between PHP on Linux and the Windows web service.

I'm basically looking for any initial guidance as to development tools, product offerings, approach, etc.
Question by:Steve Endow
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 83

Accepted Solution

Dave Baldwin earned 500 total points
ID: 39877786
There isn't a compatibility problem when you use standard 'http' and 'https' protocols.  They are the same everywhere.  The simplest version is to create an 'aspx' page that receives POST form data over 'https'.  You can test it with a standard HTML form page and when it works the way you want, you can create a POST to it in PHP using the 'curl' functions in PHP.  That is a PHP implementation of the cURL program ( ).
LVL 18

Author Comment

by:Steve Endow
ID: 39877829
Thanks.  So it sounds like it could fundamentally be pretty simple on the Windows side.

What about authentication?  I see some discussion of OAuth.

Since the communication will be between two internal corporate servers, some type of key would be okay vs. a password.
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39877895
I don't know anything about OAuth.  I do know that payment gateways like Paypal and Authorize.Net use API and identity keys that are passed as part of the POST data.  If you are using 'https', I think that is just as secure as username and password.  Paypal is a pain because they turned it into a multi-step process to complete a transaction.  That's for the Express checkout for a shopping cart.  Makes it more difficult to break in to but you probably won't need that on an internal network.
LVL 18

Author Comment

by:Steve Endow
ID: 39878095
"If you are using 'https', I think that is just as secure as username and password."

Sorry, I completely disagree with that statement.  HTTPS has nothing to do with authentication.
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39878201
You're right, "HTTPS has nothing to do with authentication."  'https' is normally used on login pages to make it more difficult to steal the usernames and passwords from the network.

I was referring to using API keys in place of username and password.  They are effectively the same thing as long as they are unique for each account.  At least Paypal and think so.  And passing the keys in the POST data means you don't have to make a separate request to 'login'.  Your 'authentication' is sent with the data.

And you can take it a step further and only accept requests from a single IP address and/or referrer.

PS: On another question, I was reminded that you can also use a non-standard port to make it even less likely that someone else will connect to your 'web service'.  You would want to pick a port above 1024 and make sure it is not being used for something else on your network.

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When coding a Webservice to provide data, the normal way is to create a method that returns a Dataset object.   But a Dataset cannot be used easily from another platform, such as PHP,  FLAS (FLEX) , etc. Solution : Return a XML Document instea…
The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question