0

clickbank のサンドボックス api の prepare メソッドを使用しようとしています。

私のコード

       $ch = curl_init(); 
       curl_setopt($ch, CURLOPT_URL, "https://sandbox.clickbank.com/rest/1.2/sandbox/prepare");
       curl_setopt($ch, CURLOPT_HEADER, true);
       curl_setopt($ch, CURLOPT_POST, true);`enter code here`
       curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
       curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/xml","Authorization:DEV-  9B0D426BC6C70C4618F37D41B7E01877E731:API-D34454EDE1D2D8F45A62588CBF1DDC6B29B2"));

       $result = curl_exec($ch);
       curl_close($ch);

      print $result;
   ?>

しかし、それは私にこのエラーを与えます

"HTTP/1.1 500 Internal Server Error Date: Fri, 15 Jun 2012 11:30:18 GMT Server: Apache/2.2.22 (FreeBSD) mod_jk/1.2.32 mod_ssl/2.2.22 OpenSSL/0.9.8q Content-Length: 409 接続: コンテンツ タイプを閉じます: text/html 内部サーバー エラー 1"

別の方法をたくさん試しましたが、常に 404 または 403 または 500 の http エラーが発生します。

4

1 に答える 1

0

これを試して:

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://sandbox.clickbank.com/rest/1.3/sandbox/prepare");

curl_setopt($ch, CURLOPT_HEADER, false);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept:application/json", "Authorization: DEV-9B0D426BC6C70C4618F37D41B7E01877E731"));

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');

$return = curl_exec($ch);

curl_close($ch);
于 2013-04-15T05:12:59.537 に答える