title: Easy Digital Downloads - Fire PHP when transaction was successful goes wrong
body: <p>I’m using Easy Digital Downloads for my Wordpress webshop. After someone buys a item it needs to add credits to the MySQL database. I got this working by adding PHP code to shortcode-receipt.php. </p>
  
  <p>This is working correct but when I reload the receipt via browser or mail the PHP code will fire again:
  <code>php
  &lt;?php 
  if( edd_is_payment_complete( $payment-&gt;ID ) &amp;&amp; edd_receipt_show_download_files( $item['id'], $edd_receipt_args, $item ) ) :
  ?&gt;</code></p>
  
  <ul>
  <li>Could someone help me out here?</li>
  <li>What is the best method to fire PHP code when a payment is successful?</li>
  </ul>
  
  <p>Thanks in advance!</p>