title: GravityForms -- retrieving order & payment details after payment
body: <p>I am creating a plugin that integrates with GravityForms, and I need a bit of help. Basically, I have an order form that takes Paypal payments. Upon payment completed, I need to retrieve two pieces of information, one from the <strong>payment details</strong> and the other from <strong>order details</strong>.</p>
  <p>I tried doing this by using the hook gform_post_payment_completed() -- see <a href="https://docs.gravityforms.com/gform_post_payment_completed/" rel="nofollow noreferrer">https://docs.gravityforms.com/gform_post_payment_completed/</a></p>
  <p>This is what my code looks like so far, but it doesn't work. For some reason, <strong>$entry</strong> doesn't populate properly as an array, but rather returns &quot;1&quot;. Same for <strong>$order</strong>.</p>
  <pre><code>add_action( 'gform_post_payment_completed', 'post_payment_processing' );
  function post_payment_processing( $entry ) {
      $order = GFAPI::get_entry( $entry['entry_id'] );
      $walletID = $order['wallet'];
      $walletCreditAmount = number_format($entry['amount']);
      // do something with the $entry array
      // do something with the $order array
  }
  </code></pre>
  <p>Any ideas of what I'm doing wrong and how I could go about fixing it?</p>
  <p>Thanks a lot + much appreciated.</p>