Bonjour, a tous ! Cela fait deja 3jours je cherches etablir une connection de mon site a paypal mais j'y arrives pas.
je visite plusieur tuto sans resultat. Voci mon code

<?php 

     $total =61.0;
     $totalttc =73.0;

     $user ="mon_user";
     $password ="le_password";
     $signature ="la_signature";

     $params = array(
      'METHOD' => 'SetEpxpressCheckout',
      'VERSION'=>'208.0',
      'USER' =>  $user,
      'SIGNATURE' =>  $signature,
      'PWD' =>$password,
      'RETURNURL' => 'http://yiboatour.com/paypalreturn',
      'CANCELURL' => 'http://yiboatour.com/paypalcansel',

      'PAYMENTREQUEST_0_AMT'  => $totalttc,
      'PAYMENTREQUEST_0_CURRENCYCODE'  => 'EUR'

      );
     //$params =http_build_query($params);
     $endpoint = 'https://api-3t.sandbox.paypal.com/nvp';
     $curl = curl_init();
     curl_setopt_array($curl, array(
      CURLOPT_URL => $endpoint,
      CURLOPT_POST =>1,
      CURLOPT_POSTFIELDS =>$params,
      CURLOPT_RETURNTRANSFER => 1,
      CURLOPT_SSL_VERIFYPEER => false,
      CURLOPT_SSL_VERIFYHOST => false,
      CURLOPT_VERBOSE => 1
      ));

     $response = curl_exec($curl);

     if (curl_errno($curl)) {
         echo "okk";
         var_dump($response);
         curl_close($curl);
         return false;
      } else  {
         curl_close($curl);
         $responseArray = array();
         parse_str($response,$responseArray);
         var_dump($responseArray);
         return $responseArray;
      }
     ?>

le resultat obetenir est
array(5) { ["ACK"]=> string(7) "Failure" ["L_ERRORCODE0"]=> string(5) "81002" ["L_SHORTMESSAGE0"]=> string(18) "Unspecified Method" ["L_LONGMESSAGE0"]=> string(33) "Method Specified is not Supported" ["L_SEVERITYCODE0"]=> string(5) "Error" }

J'arrive pas a localiser le probleme.

Voila je rencontre un petit problème avec mon code.

Ce que je fais

Décrivez ici votre code ou ce que vous cherchez à faire

Entourez votre code pour bien le mettre en forme

Ce que je veux

Décrivez ici ce que vous cherchez à obtenir

Ce que j'obtiens

Décrivez ici vos erreurs ou ce que vous obtenez à la place de ce que vous attendez :(

Aucune réponse