Help friends with the problem, there is a link created for the API request, but when sending a CURL incoming $ _GET request comes partially, the last parameter is the description
array(5) { ["sum"]=> string(32) "fgfdgfdgfdgfdgfdgfgfg" ["amount"]=> string(4) "0.01" ["cardType"]=> string(1) "1" ["currency"]=> string(3) "AZN" ["description"]=> string(5) "Order" } http: //site.loc/api/pay/? sum = 166c0be39285392a66c8b5482dcea7f9 & amount = 0.01 & cardType = 1 ¤cy = AZN & description = Order from bank&email=mail@gmail.com&errorUrl= http://site.com/error&key=dfgrhdpgdhhhhhhhhhfg/hhhhhhhhhhfg.hd/htfg/hp/hp/hl/html/gmail.com&errorUrl= 063000000 & successUrl = http: //site.com/zakaz-otpravlen/ "
that is, there is something here with description spaces, can someone tell me what the problem is with CURL?
$ch = curl_init($url); //curl_setopt($ch, CURLINFO_HEADER_OUT, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; .NET CLR 1.1.4322)"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 20); $content = curl_exec($ch); curl_close($ch); return $content;
%20. Use theurlencodefunction to encode parameters - Nick