Announcement

Collapse
No announcement yet.

Operation Parameters

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Operation Parameters

    I'm connecting to the API via PHP's native SOAP class. I believe I need to be passing the Operation method some parameters, but I can't seem to find what I'm supposed to be passing in the documentation. A little help?

  • #2
    Some follow-up to this (because I like talking to myself). I was running into a few XML errors on my end. I dug a little deeper into the developer docs on CNP and found the handy XML Verification Sandbox. When submitting the malformed XML through my SOAP client, I was originally just getting cryptic "Internal Errors" instead of a response code of 2051-2053 which would have indicated my bad XML.

    After some testing through the sandbox, I found the issues in my XML and was able to get successful (response code 0) responses to my requests. However, when feeding my validated XML through my SOAP client, I reverted to receiving 2052 errors. I'm using PHP's native SOAP client (PHP version 5.2.6), so I'm beginning to suspect that the native client is causing my issues (or that I'm using it improperly). My guess at this point is that the client is adding an invalid SOAP envelope to the request. Does anyone have any recommendations for a client that I could/should be using?

    Comment


    • #3
      A bit more on this. I was submitting the request within an array:

      PHP Code:
      $client->Operation(array($request)); 
      and that's when I was receiving the 2052 error. Not sure why I was doing that. When I send the straight request:

      PHP Code:
      $client->Operation($request); 
      gives me a 2051. My request gets a 0 (success) through the sandbox.

      Comment


      • #4
        PHP & our API

        Hi;

        We are researching this issue and hopefully we can have some answers shortly. There appears to be a problem with PHP and our API. We have researched this and it seems that there is a lot of reported cases with PHP and .NET web services.

        Here is an example of a site discussing the same issue:

        Accessing IIS Hosted WCF Services from PHP

        We are working on a solution and hopefully we can post a reply soon. Sorry for the inconvenience.

        Regards,
        Kamran Razvan
        Click & Pledge 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


        • #5
          Thanks, Kamran!

          After looking at that article, I'm more convinced that I just need to know what parameters the Operation method is expecting. Any clues?

          Comment


          • #6
            Sample PHP & XML

            Mark,

            Sorry for the delay in getting back to you. We worked on a sample PHP to help everyone with using the system.

            We also changed the sample XML to be more than just a sample. It is now accurate and will result in correct results if the GUID, UserID & Password are provided from the administrative system.

            Please visit the online manual and click on the left hand side: Samples



            Please test it and let us know if you have any other problems. We will be working on other samples and will post them soon.

            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


            • #7
              Thanks Kamran!

              It was this bit that was hanging me up:

              PHP Code:
              $params = array('instruction'=>$strParam);
              $response $client->Operation($params); 
              Since I didn't know what parameters the Operation method was expecting, I wasn't able to to make a successful request. I'll give this a try and see what happens.

              Thanks again!

              Comment

              Working...
              X
              😀
              🥰
              🤢
              😎
              😡
              👍
              👎