Title: session data
Last modified: August 28, 2018

---

# session data

 *  Resolved [cajsoft](https://wordpress.org/support/users/cajsoft/)
 * (@cajsoft)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/session-data/)
 * Hi, How to a parse the session data from a completed payment ? I’m trying to 
   pull the “name” field but i keep getting blank data.. it’s in json format.
 * $_SESSION[‘asp_data’]
 * thanks
    Craig.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/session-data/#post-10638237)
 * Hi, I have submitted a message to the developers to reply to your question.
 * Thank you
 *  Plugin Author [mra13 / Team Tips and Tricks HQ](https://wordpress.org/support/users/mra13/)
 * (@mra13)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/session-data/#post-10638819)
 * I am not 100% what you are trying to do but the best way to handle it is to use
   hooks and filters of the plugin. You can see the hooks and filters that we offer
   in the following documentation:
 * [https://s-plugins.com/stripe-payments-plugin-filter-hooks-reference/](https://s-plugins.com/stripe-payments-plugin-filter-hooks-reference/)
 * [https://s-plugins.com/stripe-payments-plugin-action-hooks-reference/](https://s-plugins.com/stripe-payments-plugin-action-hooks-reference/)
 * We are open to adding more hooks if needed.
 *  Plugin Contributor [Alexander C.](https://wordpress.org/support/users/alexanderfoxc/)
 * (@alexanderfoxc)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/session-data/#post-10639530)
 * Hi Craig.
 * As mra13 stated, you need to use hooks, as WP is event-driven.
 * Also note that you need to enable billing address collection for your product,
   otherwise customer name won’t be available.
 * If you want to get customer name, here’s an example how to do it:
 *     ```
       add_action('asp_stripe_payment_completed', 'asp_after_txn_callback', 10 ,2);
       function asp_after_txn_callback ($post_data, $charge)
       {
       $customer_name=isset($charge->source->name) ? $charge->source->name : '';
   
       if (!empty($customer_name)) {
       //do your thing with customer name
       } else {
       //no customer name available. You should enable billing address collection for your product.
       }
       }
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘session data’ is closed to new replies.

 * ![](https://ps.w.org/stripe-payments/assets/icon-128x128.png?rev=2705524)
 * [Accept Stripe Payments](https://wordpress.org/plugins/stripe-payments/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stripe-payments/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stripe-payments/)
 * [Active Topics](https://wordpress.org/support/plugin/stripe-payments/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stripe-payments/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stripe-payments/reviews/)

 * 3 replies
 * 4 participants
 * Last reply from: [Alexander C.](https://wordpress.org/support/users/alexanderfoxc/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/session-data/#post-10639530)
 * Status: resolved