Cyber​​plat Recharge API似乎无效

I'm currently working on Cyberplat's Recharge api.

The clients want me to send:

POST /cgi-bin/es/es_pay_check.cgi HTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 498

inputmessage=0000037901SM000001180000011800000125%0D%0Aapi17032++
++++++++++00017033%0D%0A++++++++++++++++++++00000000%0D%0ABEGIN%0
D%0ASD%3D17031%0D%0AAP%3D17032%0D%0AOP%3D17034%0D%0ASESSION%3D4b3
4d1d400000cb80029%0D%0ANUMBER%3D8888888888%0D%0AAMOUNT%3D11%2E00%
0D%0AAMOUNT%5FALL%3D11%0D%0ACOMMENT%3D%0D%0A%0D%0AEND%0D%0ABEGIN+
SIGNATURE%0D%0AiQBRAwkBAABCiUs00dQBATG5AgDHdZ6RYHykL46QBaAvnHYaY4
p0pDjgjO4K1Iyj%0D%0AfSBSvCRpS%2F0EYO9NspuyLeANEQQkkGE%2F37gUxiPqz
AgStXjpsAHH%0D%0A%3DvSgb%0D%0AEND+SIGNATURE

I'm sending:

$ses = date("Ymdhis");
$url = "http://ru-demo.cyberplat.com/cgi-bin/DealerSertification/de_pay.cgi";
$data_string = "SD=XXXXXX&AP=XXXXXX&OP=XXXXX&SESSION=".$ses."&COMMENT=Test&NUMBER=9642065662&AMOUNT_ALL=10.0&AMOUNT=10.0";

$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded','Content-Length: '.strlen($data_string)));
curl_setopt($ch, CURLOPT_POSTFIELDS, "inputmessage=0000038801SM000001270000012700000125&".$data_string);
$result = curl_exec($ch);

var_dump($result);

Was this correct way to send the request in the above format ? the response i'm getting bool(false)

Don't forget to set CURLOPT_POST to true, e.g., curl_setopt($ch, CURLOPT_POST, true); Only setting the CURLOPT_POSFIELDS might not result in a POST request being performed (though I'm not sure how curl exactly handles this)

Also, you migh want to use curl_setopt($ch, CURLOPT_VERBOSE, true); to show debug information. This is outputted to STDERR, whatever that might be on your configuration. To change it, set the CURLOPT_STDERR option.

$url="http://ru-demo.cyberplat.com/cgi-bin/DealerSertification/de_pay.cgi?inputmessage=".urlencode($data_string );
$opts = array( 
  'http'=>array( 
    'method'=>"GET", 
    'header'=>array("Content-type: application/x-www-form-urlencoded
") 
  ) 
); 

this is the correct way