title: How to retrieve information about a transaction just performed?
body: <p>This is my code:</p>
  
  <pre><code>$gateway = GatewayFactory::create('PayPal_Express');
      $gateway-&gt;setUsername('name');
      $gateway-&gt;setPassword('pass');
      $gateway-&gt;setSignature('sig');
      $gateway-&gt;setTestMode(true);
  
      $resp = $gateway-&gt;purchase(
              array(
                  'cancelUrl' =&gt; 'mysite/',
                  'returnUrl' =&gt; 'mysite/success',
                  'description' =&gt; "mysite item",
                  'amount' =&gt; $amount, //final amount
                  'currency' =&gt; 'EUR'
                  )
              )-&gt;send();
  
      if ($resp-&gt;isSuccessful()) {
          // payment was successful: update database
          // never reached
          $a = new database('database');
          $a-&gt;write database;
          $dbp = null; die;
          print_r($resp);
      } elseif ($resp-&gt;isRedirect()) {
          // redirect to offsite payment gateway
          $resp-&gt;redirect();
      } else {
          echo $resp-&gt;getMessage();
          header('Location: mysite/error');
          exit;
      }
  </code></pre>
  
  <p>How can I retrive informations about the transaction after the redirect?<br>
  How to adapt this code for credit card on paypal?</p>