Home › Forums › Stripe Payments Plugin › Pass custom fields to asp_after_txn_callback
- This topic has 1 reply, 2 voices, and was last updated 2 years, 11 months ago by alexanderfoxc.
July 6, 2020 at 6:19 pm #3053joshlang412Participant
Currently i have my site customized to where some forms are populated along with some custom logic. Once this logic is complete the user is directed to a page that populates some of the output of that custom logic (fields they populated at earlier page, calculations based on what they provided, etc..) along with the subscription plan/product short code to allow them to sign up and make the payment if desired. From there the stripe functionality is working as expected and then the page displays a spinning circle that eventually just re-directs back to the URL of the previous page.
1.User populates form on Page A
2.Form values are maintained and caclulated on in custom logic
3.User is re-directed to Page B with a display of the information from 1-2 along with the stripe subscription button shortcode
4.User completes the stripe process and is re-directed back to Page B (or a seperate confirmation page)
I am looking to implement some post-processing custom logic to my site to populate some information in my database once the stripe payment is complete/confirmed. Then once this is complete i want to re-direct to a Page C that shows a generic confirmation message along with some of those same field values/calculated fields. I am using the action hooks (https://s-plugins.com/stripe-payments-plugin-action-hooks-reference/) and doing some custom logic in the asp_after_txn_callback action hook. I am fine doing my custom logic using the values in the strip array however i want to pull in my other custom values from steps1-3 above. I am looking for a way to pass along these non-stripe custom variables so that they are kept for post-processing in the asp_after_txn_callback function. I utilize the plugin shortcode for the product to display the Buy Now button. In theory i am looking to pass along my custom values when this button is clicked to be used later in the function once the stripe popup/payement is complete… Any input here?July 6, 2020 at 8:35 pm #3054alexanderfoxcParticipant
After step 2, are the values processed on your backend somehow? If yes, then you can save those either into session or into database and then load them in asp_after_txn_callback.
- You must be logged in to reply to this topic.