Monday, May 7, 2012

eKomi link genaration

In this post i will show , how connect The SOAP-endpoint of the eKomi APIs http://api.ekomi.de/v2/wsdl and how to get account information using getSnapshot method via PHP.



The following parameters are expected for get account information, 1) auth 2)version

 Auth parameter containt Interface-ID and Interface-Password, separated by pipe (|) Example765|kgdf143shjk468775

Description of version is Script-Version. For self- build precede with ‘cust-’
 Example
cust-1.0.0


The response is a serialized PHP-array with the following elements:


Parameter Type
info array
info[account_name]
info[ekomi_certificate]
info[ekomi_certificate_id]
info[ekomi_certificate_seo]
info[fb_count]
info[fb_avg]
info[fb_avg_detail]
info[fb_avg_room]
info[fb_avg_service]
info[fb_avg_catering]
info[fb_avg_ambience]
feedbacks
feedbacks[0-9]
feedbacks[0-9]
 [transaction_id]

feedbacks[0-9] int Star rating (1-5)
[rating]
feedbacks[0-9]
[rating_room]
feedbacks[0-9]
[rating_service]
feedbacks[0-9]
[rating_catering]
feedbacks[0-9]
[rating_ambience]
 feedbacks[0-9]
    [message] 5)
    feedbacks[0-9]
    [comment] (1-5)
    feedbacks[0-9]
    [delivered] (1-5)

Following is example of php implementation of eKomi link genaration integration.


                        try{
                            $Clientekomi = new soapClient($config->ekomiWsdl);
                            $method = "getSnapshot";
                          
                            $paramss = array( new SoapParam($interfaceid.'|'.$ekomipassword, 'auth'), new SoapParam($config->ekomiCusVertion, 'version'));
                          
                            $retunarray = $Clientekomi->__call($method, $paramss);
                            $arr = unserialize(urldecode($retunarray));
                            $ekomicertificate = $arr['info']['ekomi_certificate_seo'];                       
                        }  catch (Exception $e){
                            //print_r($e);
                            print_r("Error Ocured When try to get Ekomi certificate url - $errorlang..!! \n");
                            //die('die in url');

                        } 


hope this will help you get better idea.... cheeeears... :)

5 comments:

  1. Hi Kavin,
    referring to your article, I'd like to do the same thing, but using Javascript, since the e-commerce that i'm using (made in ASP) doesn't allow me to add any code (aside Javascript).
    Could you maybe help me in some way?

    I asked eKomi support, but after one month, nothing.
    Thank you!

    ReplyDelete
    Replies
    1. hi Andrea,
      sure, i think. i can help you. what is the e-commerce application that you use

      Delete
    2. It's called ReadyPro, created by an italian firm, but I believe it doesn't matter, because it's a proprietary software. Therefore I'd need to do that thing exclusively in Javascript / jQuery.

      Delete
  2. Thanks Kavindu, that was very helpful!

    ReplyDelete