We don’t have a built-in integration with Salesforce, but we do have a hook function that can be called after payment is successfully processed: https://wpplugin.org/documentation/run-custom-php-after-payment/
Depending on your use-case, you may be able to set up a plugin to hook into this function to make the needed calls to Salesforce. As I mentioned, it’s not something that we have built-in, but it would theoretically be possible using the hook and some custom integration.
Thread Starter
Nile
(@nilesprague)
Hi Collin, thanks so much for your fast response!
In the hook you mentioned, can I access the form data that was already submitted? I would need the data at that point so I can push it to Salesforce upon successful payment.
Thanks!
Unfortunately, I believe the function only hooks into payment data from our plugin. But I suppose you could use the hook from our plugin to trigger another function that initiates the push of your CF7 data to be sent into Salesforce after the payment is successful. Our plugin really doesn’t touch the CF7 data – we’re just a payment addon for CF7.
Thread Starter
Nile
(@nilesprague)
OK, hmm, that does complicate things.
I see that one of the plugin features is, “Only send Contact Form 7 email if PayPal payment is successful.” This makes it sound like the plugin has the ability to delay the submission of the form data until after the payment was successfully processed – if there’s somewhere I could connect with that functionality, but have it send to SF instead of send the email, I’d be on the right track… any thoughts?
Our plugin hooks into Contact Form 7’s wpcf7_before_send_mail trigger – you might want to look into saving your form prior to that?
We also have a cf7pp_payment_successful_pre_send_email_filter hook that you might want to try grabbing the data from?
-
This reply was modified 5 years, 1 month ago by
Collin Sasse.
Thread Starter
Nile
(@nilesprague)
Okay, great. I’ll check those out. Thank you.
From what I could see, the hooks you’re talking about are only available with the Pro version of the plugin. Is that correct? If yes, is there a free trial or money back guarantee or something so I can test things out and make sure it will work?
The free version of the plugin does not hook into or alter CF7 emails at all.
The pro version has the ability to run custom PHP and can hook into other functions, as detailed at https://wpplugin.org/documentation/run-custom-php-after-payment/
Either way, you’re likely going to need custom integration with Salesforce to achieve what you’re looking to do.