Method Community

 

How to call methods in PHP

Last post 05-15-2016 9:35 PM by ImTheirWebGuy. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 02-13-2012 9:39 AM

    • luvboy
    • Not Ranked
    • Joined on 02-13-2012
    • Posts 3

    How to call methods in PHP

    Hello All,

    Can anyone tell me how to call method integration webservices via PHP

    i've developed a website in wordpress which i need to call a method and insert some data into tables

    atleast can someone give me a documentation links please

    Thanks

  • 02-13-2012 2:19 PM In reply to

    Re: How to call methods in PHP

    Hi luvboy

    The API documentation and examples can be found here> http://www.methodintegration.com/self-service-documentation.aspx

    How to call is the same as any other webservice.  You can just google "Consuming a webservice using PHP".

    HTH 

    Mark Crews
    Cloud Consultancy
    Principal and Developer


    • 2012 MethodCRM Partner of the Year

    • 2012 MethodCRM Community Excellence Award

    • 2011 MethodCRM Community Excellence Award


    Visit our website to find out about our training, support, and customization services.
    website: cloudconsultancyllc.com
    blog: cloudconsultancyllc.com/blog/
    ph: 434.326.1601
    e: support@cloudconsultancyllc.com

    What is Method?
  • 02-14-2012 3:39 AM In reply to

    • luvboy
    • Not Ranked
    • Joined on 02-13-2012
    • Posts 3

    Re: How to call methods in PHP

    thanks for the reply marks

    I'm using nusoap client to consume the webservices

    i find a weird problem here, i'm getting result for some methos and failure for some methods

    can you help me out with any of these methods

    I need to get the a record from certain table ??

    this is the error i'm getting 

    stdClass Object ( [MethodAPISelect_DataSetResult] => Failure. The API could not validate your log in. Please make sure you have entered the correct Company Account, User and Password, and that each are spelt correctly. Also, ensure that this User has been configured for Method API access by going to Customize > Users, editing the User, and ensuring that there is a check in the 'Is Allowed to Connect via MethodAPI' checkbox. )

    This is the code...where is the mistake

            $company = "-";

    $login = "-";

    $password = "-";

    $table = "Customer";

    $fields = "MAX(CustomerNumber) as CustomerNo";

    $dsResp = "";

    $param = array("strCompanyAccount" => $company, "strLogin" => $login, "strPassword" => $password, "", $dsResp, "strTable"=>$table, "strFields"=>$fields,"","","","");

    $result = $client->call('MethodAPISelect_DataSetV2', array('parameters' => $param), '', '', true, true);

    echo "<pre>";

    print_r($result);

    echo "</pre>";

     

  • 02-14-2012 8:29 AM In reply to

    Re: How to call methods in PHP

    Don't think I can help much with the PHP, we are more on the C#.net side.   However,  this reponse is related to properties set inside a method account.  Did you log into method and check that the user who's credentials you are passing to the webservice has API perrmission set to true?

    Mark Crews
    Cloud Consultancy
    Principal and Developer


    • 2012 MethodCRM Partner of the Year

    • 2012 MethodCRM Community Excellence Award

    • 2011 MethodCRM Community Excellence Award


    Visit our website to find out about our training, support, and customization services.
    website: cloudconsultancyllc.com
    blog: cloudconsultancyllc.com/blog/
    ph: 434.326.1601
    e: support@cloudconsultancyllc.com

    What is Method?
  • 04-09-2013 6:15 PM In reply to

    Re: How to call methods in PHP

    I am curious to know if you found a solution to your problem. If not, I recently had the same problem and fixed it. I am also looking for people who have experience with accessing Method CRM through PHP in order to build a PHP interface to sell to Method CRM. If you are interested, please email me at jeff@theinfinitylabs.com.

  • 01-21-2015 5:11 PM In reply to

    Re: How to call methods in PHP

    Did anyone solve this? I assume someone got it working in PHP since 2013?? Im getting the same error... Failure. The API could not validate your log in.

  • 01-22-2015 8:28 AM In reply to

    Re: How to call methods in PHP

    Hi. Were you able to run your calls in a different way? Like for example, using curl?

  • 01-21-2016 11:11 AM In reply to

    Re: How to call methods in PHP

    I am getting the same error, too.  Following.

  • 05-15-2016 9:35 PM In reply to

    Re: How to call methods in PHP

    Answer

    I had the same issue back in 2013, and I got around it using curl:

    http://imtheirwebguy.com/cforms-to-methodcrm-getting-dirty-with-soap/

Page 1 of 1 (9 items)