• Hello,

    I am trying to get the following to work with CF7:
    1 CF7 form collects user data for ticket
    2 action url is a mydomain.com/psp/script-from-payment-service-provider
    3 depending on the return of script-from-payment-service-provider
    3a: succesfull – CF7 customize email will be sent with auto generated pdf tickets attached (using tcpdf for this)
    3b: failure – replace CF7 form with failure message.

    I have already develop the process 1 and 3a (so with no payment, the user gets the tickets immediately). I need to build the payment part.

    For step 2 i am trying

    <script>
        function psp_redirect() {
         var amount= document.getElementById("price").value;
      var qty= document.getElementById("qty").value;
         var url = "https://www.mydomain.com/psp/script-from-payment-service-provider.php?price="+amount+"&qty="+qty+"&return=https://result";
         window.location = url;
        }
    </script>

    and in additional headers
    on_sent_ok: psp_redirect();

    But how can i sent the return from script-from-payment-service-provider.php back to CF7 form page and sent an email?

    Any suggestions?

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 1 replies (of 1 total)
  • Hi!

    I’m interested in the same. To begin with you probably need to turn off ajax on WPCF7 for testing. I’ve turned off everything in my current form in wp-config.php and added:

    define('WPCF7_LOAD_CSS', false);
    define('WPCF7_LOAD_JS', false);
    define('WPCF7_AUTOP', false); // removes WP paragraphs

    When you’re done testing it might be a good idea to just add the css/js files to the actual page templates that contain forms. Check out https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/

    I’ll check back if I have any success with this, but haven’t got time for a few days.
    Good luck,
    T

Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to hold sending email after a feedback has been processed?’ is closed to new replies.