JustMeInAZ Posted February 8, 2019 Share Posted February 8, 2019 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! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.