We are using Gravity Forms with Gravity Forms User Registration and Gravity Forms SystemPay (a plugin to collect our donations through SystemPay).
Gravity Forms SystemPay is a very light plugin but we can get through IPN the payment confirmation after the donation. On the other hand, we do not have any pre-made “events” on Gravity Form User Registration in order to only Create/Update the account if the donation is paid.
So we are looking for a way to do it in PHP.
Can we use this filter : gform_is_delayed_pre_process_feed to delay the User Registration feed for like 20 minutes. After 20 minutes the system would look if the payment status is “Paid” then the feed would start. If the payment status is still “Pending” or “Cancelled” then the feed would not start.
Is it possible ? I am looking for every idea.
I know that we can “manually” validate Users in the “Create user” feed, but in the “Update feed” we do not have this option, all parameters are instantly send to the user profile.
I am sorry for my english. I hope I was clear.
Thanks by advance,
Jonathan
EDIT : Gravity Forms SystemPay add-on offer a solution to delay Notifications based on payment status with the following code :
Payment add-ons can delay feeds for other add-ons, including User Registration, by overrding the get_post_payment_actions_config function in their add-on class which extends the GFPaymentAddOn class. Here is what that looks like in the Stripe add-on: Screenshot 2022-06-06 at 08.58.29.png - Droplr
When that function returns an array and the feed add-on supports the delayed payments feature then the payment add-on will automatically delay the feeds when enabled in the feed configuration.
To trigger processing of the delayed feed post payment the add-on should include the following code in their method which handles processing the IPN or webhook from the payment gateway: