Problem with the CloseChekout API (ERR_CUSTOMER_NOT_FOUND)

  • 1.9K Views
  • Last Post 16 May 2018
  • Topic Is Solved
Iaroslav posted this 14 May 2018

Dear GFS developers, 

 

We need to use CloseChekout Api. When we perform the following SOAP request (via SoapUI), the result is ERR_CUSTOMER_NOT_FOUND (2000).

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ...>
   <soapenv:Header/>
   <soapenv:Body>
      <tem:CloseCheckout>
         <tem:closeCheckoutRequest>
            <gfs:SelectedSuperservice>
               <gfs1eliveryOptionId>[selected by widget]</gfs1eliveryOptionId>
            </gfs:SelectedSuperservice>
            <gfs:Session>
               <gfs1:APIKeyID>[Api key from Management console]</gfs1:APIKeyID>
               <gfs1:SessionID>[session id taken from browser console (generated by the widget)]</gfs1:SessionID>
            </gfs:Session>
         </tem:closeCheckoutRequest>
      </tem:CloseCheckout>
   </soapenv:Body>
</soapenv:Envelope>

 

First of all, let us know what you mean by "Customer". Is it your customer (TPS) or our customer (User)? If the first is true, then maybe the ApiKey that was provided to us is incorrect or did not have enough authority. Otherwise, there is no information about integration between our customers and your service in Docs. Please, provide us with it in case there is some. 

 

P.S.: We tried session ids both from the demo and the customized gfs-checkout-widget (supplied with a fresh token based on our client_id/secret). 

 

Sincerely,

 

IAROSLAV BARANOV 

Software Engineer (EPAM System)

We develop the integration on behalf of The Perfume Shop

Order By: Standard | Newest | Votes
Simon Wilson posted this 14 May 2018

Hi Iaroslav,

 

The customer not found is referencing the TPS - API Key that should of been provided to you by them, 

are you able to private message me the API key and i will check it is correct?

 

Kind regards

Simon

  • Liked by
  • Iaroslav
Iaroslav posted this 14 May 2018

Hi Simon,

 

I have sent you a private message.

 

Sincerely,

IAROSLAV BARANOV 

Software Engineer (EPAM System)

Simon Wilson posted this 14 May 2018

Hi Iaroslav,

 

I have chceked the API key and it is correct,

 

can you confirm the end point you are talking to? it should be http://api.checkout.justshoutgfs.com/V8/CheckoutAPI/CheckoutProvider.svc unless you are using the test API which is 

http://test.api.checkout.justshoutgfs.com/V8/CheckoutAPI/CheckoutProvider.svc and this is a different API key required from the management portal.

 

I will private message you back the test API key you need to use if you are using the test api.

 

Kind regards

Simon

Simon Wilson posted this 16 May 2018

Hi Iaroslav,

 

I have checked the request and details you have sent me and the reasons you are seeing the error is that are not taking a live sessionID and deliveryID from a getcheckoutorder response.

 

Please see below 

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:gfs="http://schemas.datacontract.org/2004/07/GFS.Enterprise.Checkout.Public.DataContracts.Request" xmlns:gfs1="http://schemas.datacontract.org/2004/07/GFS.Enterprise.Checkout.Public.DataContracts.Partial" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:gfs2="http://schemas.datacontract.org/2004/07/GFS.Enterprise.Checkout.Public.DataContracts.Enumerations">

   <soapenv:Header/>

   <soapenv:Body>

      <tem:CloseCheckout>

         <tem:closeCheckoutRequest>

            <gfs:SelectedSuperservice>

               <!--This must be taken from the getcheckoutorder response after a request has been sent-->

               <gfs1eliveryOptionId>*Develieryoption ID here*</gfs1eliveryOptionId>

            </gfs:SelectedSuperservice>

            <gfs:Session>

               <gfs1:APIKeyID>*API KEY HERE*</gfs1:APIKeyID>

               <!--This must be taken from the getcheckoutorder response after a request is sent-->

               <gfs1:SessionID>*SESSIONID HERE*</gfs1:SessionID>

            </gfs:Session>

         </tem:closeCheckoutRequest>

      </tem:CloseCheckout>

   </soapenv:Body>

</soapenv:Envelope>

Iaroslav posted this 16 May 2018

Hi Simon,

 

Thank you very much for a detailed explanation. Our team was provied with the real ApiKey, but the url was http://test.api.checkout.justshoutgfs.com/V8/CheckoutAPI/CheckoutProvider.svc. So, there are two different API keys and we have both of them now. 

 

It is worth noting that the session id should be taken from GetCheckoutOrder response. I got ERR_CUSTOMER_NOT_FOUND after changing the URL because I used the session id generated by the widget. It looks like they are different for SOAP Api and REST api. Please, correct me if I am wrong. 

 

Sincerely,

IAROSLAV BARANOV 

Software Engineer (EPAM System)

Close