Paypal PDT only returns "FAIL" -


since don't code work , don't have clue, why, perhaps 1 of can give me advice? value "fail"

what i've tried far:

  • identity-token definitively correkt
  • $tx has value
  • $tx hasn't been used more 5 times

this code:

<?php    $tx = $_get['tx'];  $identity = '############################';     // init curl  $ch = curl_init();     // set request options  $url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';  $fields = array(      'cmd' => '_notify-synch',      'tx' => $tx,      'at' => $identity,  );    curl_setopt($ch,curlopt_url, $url);  curl_setopt($ch,curlopt_post, count($fields));  curl_setopt($ch,curlopt_postfields, http_build_query($fields));  curl_setopt($ch,curlopt_returntransfer, true);  curl_setopt($ch,curlopt_header, false);  curl_setopt($ch, curlopt_httpheader, array("host: www.sandbox.paypal.com"));    // execute request , response , status code  $response = curl_exec($ch);  $status   = curl_getinfo($ch, curlinfo_http_code);    // close connection  curl_close($ch);  if($status == 200 , strpos($response, 'success') === 0)  {      echo $response;  } else {      echo "error... :(";      echo $response;      exit;  }  ?>   

i used curl since other snippets found didn't return anything.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -