WordPress.org

Ready to get started?Download WordPress

Forums

Contact-Form-7: 3rd-Party Integration
Redirect to payment gateway (2 posts)

  1. simonswiss
    Member
    Posted 1 year ago #

    Hello!

    I'm trying to get the post action to actually redirect the client to a payment gateway once they click submit on my form.

    I am passing a few hidden static fields (one dynamic - registration ID) and i need these field values to be posted to the payment URL so the payment page successfully works.

    Is it possible? So far i am stuck at receiving the e-mail with the form data, but it seems nothing happens with the 3rd party integration.. how can i redirect the page to the url set in "submission url"?

    The ideal way would be that no e-mail is sent to the admin before payment is proceeded. If payment is successful, then the admin gets the payment confirmation and form details.

    http://wordpress.org/extend/plugins/contact-form-7-3rd-party-integration/

  2. zaus
    Member
    Plugin Author

    Posted 1 year ago #

    This plugin, and Contact Form 7 which it piggyback's from, is primarily concerned with a "silent post" in mind. Interrupting the flow of CF7 to actually redirect the page is tricky, because there's not really a good mechanism to accept re-posts.

    I don't think what you want actually needs my plugin -- instead you'd need to 1) disable ajax for CF7, 2) find a hook to change the form "action" attribute to your gateway, 3) reconstruct the original action url and include it as a hidden field, so the gateway can redirect and repost the original form values (including the nonce, because otherwise it won't accept the submission).

    I might be missing something -- what payment gateway are you using? It would be better if they provided an API so you could use the "silent post" mechanism, and instead write a hook on Forms3rdPartyIntegration_service_a1 to examine the gateway response for success or failure -- see Other Notes/Hooks for more details

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic