We need a small PHP script that will respond to an HTTP XML post (see attached example) containing a request for product availability and return an XML formatted response.
We have three tables in a local MySQL DB that will be queried once the XML post is received.
xml_auth - which is used to verify that the system sending the request is authorized to do so.
items- products descriptions and list prices
prod_avail - Units available for each product by warehouse
These are the steps we would like the script to follow:
1- Check table 'xml_auth' to make sure sender has submitted valid credentials. If successful continue with local query otherwise return response with status failed.
2- Pull customers pricing multiplier from 'xml_auth' and look up product list price from table 'items'.
3- Query table 'prod_avail' for quantities available in each warehouse.
4- Generate and send XML response.
'multiplier' is used to calculate the net price of an item. Net Price = List Price X multiplier. For example, if the customer multiplier is .8 (20% discount off of list) the Net price of an item that costs $[url removed, login to view] would be $[url removed, login to view] (note: round out three decimal places)
If (qty_avail (table 'prod_avail) > Qty requested) return Qty requested otherwise return qty_avail
We would like to keep a log of all requests and responses sent through this system that will be stored in a local table.
If you are interested in bidding on this project and would like more info please send me a PM and I will send over a detailed file layout of both the request and response as well as a sample of the current DB tables the script will use.
Let me know if you have any questions!