Hi,
I am assisting a client to use the API on a PHP site. I checked the help pages and the Manual to see how this should be done. The url to send the API call has been specified in the help section, and I believe I should use POST to send the XML.
>From work on other APIs I know that probably I should base64 the raw XML and assign it a name and then send it with POST method - actually as we are doing a server-to server call I will use a PHP custom function to send the data. To make this simple, lets just ignore that I am sending the data from the server and pretend it is being sent with a browser in an HTML form. To send the data from a form, I'd have to use a form like this:
Code:
---------
<form method="POST" action="https://paas.cloud.clickandpledge.co...rvice.svc?wsdl">
<input type="hidden" name="???" value="my_xml_data_here"/> <input type="submit" name="submit" value="Send to server"/> </form>
---------
My questions:
1. I am using POST, is that the correct way?
2. Is the target url (action) correct?
3. For the hidden input what name should I use in place of question marks?
4. Is my assumption about converting raw XML to base64 before sending correct?
Thank you for your help in advance,
Majid
***************
I am assisting a client to use the API on a PHP site. I checked the help pages and the Manual to see how this should be done. The url to send the API call has been specified in the help section, and I believe I should use POST to send the XML.
>From work on other APIs I know that probably I should base64 the raw XML and assign it a name and then send it with POST method - actually as we are doing a server-to server call I will use a PHP custom function to send the data. To make this simple, lets just ignore that I am sending the data from the server and pretend it is being sent with a browser in an HTML form. To send the data from a form, I'd have to use a form like this:
Code:
---------
<form method="POST" action="https://paas.cloud.clickandpledge.co...rvice.svc?wsdl">
<input type="hidden" name="???" value="my_xml_data_here"/> <input type="submit" name="submit" value="Send to server"/> </form>
---------
My questions:
1. I am using POST, is that the correct way?
2. Is the target url (action) correct?
3. For the hidden input what name should I use in place of question marks?
4. Is my assumption about converting raw XML to base64 before sending correct?
Thank you for your help in advance,
Majid
***************
Comment