Announcement

Collapse
No announcement yet.

Repost: General questions about API (Repost by support)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Repost: General questions about API (Repost by support)

    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
    ***************
    Regards,
    Click & Pledge Support Department

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

  • #2
    Sample programs for PHP

    Hi,

    Sorry for late reply. Our API is a web service and you can't treat it like a web form to post information to.

    We are working on a PHP sample to post so you can see how to use it in PHP.

    Regards,
    The Support Department
    Regards,
    Click & Pledge Support Department

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

    Comment


    • #3
      Sample PHP &amp; XML

      Majid,

      Please check the manual at https://developers.clickandpledge.com and click on the link titled Samples.

      We have developed a sample code in PHP to help with PHP development. Please review and let us know if we can answer any questions you may have.

      Regards,
      Kamran Razvan
      Click & Pledge Support
      Regards,
      Click & Pledge Support Department

      Join us @ the educational webinars: https://clickandpledge.com/webinars/
      Live Support- read more: https://support.clickandpledge.com/s/article/general-information-live-support/

      Comment

      Working...
      X