Jump to content

Custom HTTP headers in form submission


Recommended Posts

Hello,

I'm using a 3rd party gateway for payment processing.  In the plugin, I'd like to be able to set a custom HTTP header prior to sending the customer off to the 3rd party (which I'll then receive back from them when they hit the callback script).  I see examples of existing gateway modules where the <gatewaymodule>_link() function generates a string which contains an HTML form with all the required fields as well as the URL of the 3rd party form, and then returns that string.  I thought that I may be able to, instead, return a snippet that included a javascript function, which would be called via <form onsubmit="....">, and that javascript function would then set the custom HTTP header(s) and do the post via ajax.  That didn't appear to work, so now I'm posting here in hopes that someone more familiar with WHMCS than I (which, admitedly, is probably everyone) may be able to point me in the right direction as to how to accomplish this.

Thanks in advance!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated