// Call the Funktion sign($jsonData, $secret) in CreateProductJsonOrderwithSignature.php with parameters $jsonData and // secret: $jsonData = '{"totalprice":"17.97","callbackurl":"https://www.anbietershop.de/HandleonOfficeOrderResponse.php","parametercacheid":"0e81f10f-6de8-4edc-cdcf-de96cf61624c","products":[{"quantity":"3","circleofusers":"customer","price":"5.99","name":"onOffice Sample 1"}]}' $secret = 'myTestSecret' // Add timestamp (in this example 1565689180); $jsonDecodedContent = json_decode($jsonData, true); $jsonDecodedContent['timestamp'] = time(); // sorted array after call of sortParameters($jsonDecodedContent): [ "callbackurl" => "https://www.anbietershop.de/HandleonOfficeOrderResponse.php", "parametercacheid" => "0e81f10f-6de8-4edc-cdcf-de96cf61624c", "products" => [ [ "circleofusers" => "customer", "name" => "onOffice Sample 1", "price" => "5.99", "quantity" => "3" ] ], "timestamp" => 1565689180, "totalprice" => "17.97" ] // The string to be signed loos like this (after call of http_build_query($jsonContent, '', '&', PHP_QUERY_RFC3986)): callbackurl=https%3A%2F%2Fwww.anbietershop.de%2FHandleonOfficeOrderResponse.php¶metercacheid=0e81f10f-6de8-4edc-cdcf-de96cf61624c&products%5B0%5D%5Bcircleofusers%5D=customer&products%5B0%5D%5Bname%5D=onOffice%20Sample%201&products%5B0%5D%5Bprice%5D=5.99&products%5B0%5D%5Bquantity%5D=3×tamp=1565689180&totalprice=17.97 // Generate following signature with secret "myTestSecret" and call of // $jsonSignature = hash_hmac('sha256', $jsonQueryContent, $secret): 49b818db62d1b86640ea34f4525e64809fa44d5e0b90ad719aadd5425f66c9ba