sharing data by using xml
-
Hi!I have a scenario.a company ask me to include a payment system in my application and this is the requirement :
a) we need you to provide us a location (in the form of a URL) which we can use to hit your server
b) we will send information regarding a payment transaction in the following XML format to your server at the URL address:Request sent from ABC Company to My Company
<?xml version="1.0"?>
<!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd">
<COMMAND>
<TYPE>PAYMENT</TYPE>
<COMPANYNAME>Luku</COMPANYNAME> <CUSTOMEREFID>refernceNumber</CUSTOMEREFID>
<MSISDN>msisdn</MSISDN>
<AMOUNT></AMOUNT>
<TXNID></TXNID>
<STATUS></STATUS>
</COMMAND>c) on your side, we need you to interpret the information provide in the XML string, take whatever actions need to be taken on your platform, and then give us a response with the results of your actions in the following format:
Asynchronous response sent from My Company to ABC <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00001</TXNID> <REFID>1357</REFID> <RESULT>TS</RESULT> <ERRORCODE>ERR123</ERRORCODE> <FLAG>Y</FLAG> <CONTENT>Content For Sending SMS</CONTENT> <MSISDN>09899847486</MSISDN> <COMPANYCODE>Luku</COMPANYCODE> </COMMAND> I have tried to resolve,this is my xml file I have created: <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00001</TXNID> <REFID>1357</REFID> <RESULT>TS</RESULT> <ERRORCODE>ERR123</ERRORCODE> <FLAG>Y</FLAG> <CONTENT>Content For Sending SMS</CONTENT> <MSISDN>09899847486</MSISDN> <COMPANYCODE>Luku</COMPANYCODE> </COMMAND> and this is my .dtd file : <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00
-
Hi!I have a scenario.a company ask me to include a payment system in my application and this is the requirement :
a) we need you to provide us a location (in the form of a URL) which we can use to hit your server
b) we will send information regarding a payment transaction in the following XML format to your server at the URL address:Request sent from ABC Company to My Company
<?xml version="1.0"?>
<!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd">
<COMMAND>
<TYPE>PAYMENT</TYPE>
<COMPANYNAME>Luku</COMPANYNAME> <CUSTOMEREFID>refernceNumber</CUSTOMEREFID>
<MSISDN>msisdn</MSISDN>
<AMOUNT></AMOUNT>
<TXNID></TXNID>
<STATUS></STATUS>
</COMMAND>c) on your side, we need you to interpret the information provide in the XML string, take whatever actions need to be taken on your platform, and then give us a response with the results of your actions in the following format:
Asynchronous response sent from My Company to ABC <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00001</TXNID> <REFID>1357</REFID> <RESULT>TS</RESULT> <ERRORCODE>ERR123</ERRORCODE> <FLAG>Y</FLAG> <CONTENT>Content For Sending SMS</CONTENT> <MSISDN>09899847486</MSISDN> <COMPANYCODE>Luku</COMPANYCODE> </COMMAND> I have tried to resolve,this is my xml file I have created: <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00001</TXNID> <REFID>1357</REFID> <RESULT>TS</RESULT> <ERRORCODE>ERR123</ERRORCODE> <FLAG>Y</FLAG> <CONTENT>Content For Sending SMS</CONTENT> <MSISDN>09899847486</MSISDN> <COMPANYCODE>Luku</COMPANYCODE> </COMMAND> and this is my .dtd file : <?xml version="1.0"?> <!DOCTYPE COMMAND PUBLIC "-//Ocam//DTD XML Command 1.0//EN" "xml/command.dtd"> <COMMAND> <TYPE>GBPHANDLER</TYPE> <TXNID>BP120522.1117.C00
I would suppose the URL you need to give will be the address url of your HANDLER to handle the client companys request.... (the page you make to process the request) So if your handler was called TransactionValidator.php then the url would be.... http://www.yourcompany.net/some-folder/TransactionValidator.php I thought a .dtd was a document type definition in which case it should describe the data format of your xml file (I recommend you check this - as i may be wrong). Yes you need to persist the request (and the results) in a database for future refrence in case things go pear shaped!!
-
I would suppose the URL you need to give will be the address url of your HANDLER to handle the client companys request.... (the page you make to process the request) So if your handler was called TransactionValidator.php then the url would be.... http://www.yourcompany.net/some-folder/TransactionValidator.php I thought a .dtd was a document type definition in which case it should describe the data format of your xml file (I recommend you check this - as i may be wrong). Yes you need to persist the request (and the results) in a database for future refrence in case things go pear shaped!!