Feature Requests
Share ideas, discuss and vote on requests from other users in community
 

MANDATORY | CRITICAL BUGFIX | Add ability to add query strings into paypal

WHUser shared this idea 3 years ago
Already Possible

MANDATORY | CRITICAL BUGFIX | Add mandatory requirement to add query strings into paypal

I tried to manually add it but everything is encrypted, which is ridiculous.

It is a mandatory requirement for WHMCS to add query strings to the paypal url. It is literally just a few letters to add into the URL and then it works. I do this already for my non-WHMCS site. Now I need to do it in WHMCS.

This is MANDATORY because without a query string it's impossible in WHMCS to change the paypal custom payment page or do other required things, but mainly the custom payment page.

You can change the paypal custom page based on the name you gave your custom page in paypal, using this super-ultra-simple query string, that is added into the url:

  1. &page_style=MyPaypalPageStyle

So, for example your URL might look like this:

  1. https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&notify_url=' . urlencode(WEB_ROOT) . '&business=' . urlencode($paypalemailadd) . '&page_style=MyPaypalPageStyle&no_note=1&currency_code=' . urlencode(CURRENCY_CODE) . '... etc etc

Do you see where I literally just inserted that string above?

Well to do this you can simply code it like this:

On page

  1. [http://mywebsite.com/whmcs]/configgateways.php?updated=paypal#m_paypal

Add this new input below "API Signature":

  1. <tr>
  2. <td class="fieldlabel">Query Strings (ADVANCED USERS ONLY)</td>
  3. <td class="fieldarea"><input type="text" name="field[querystrings]" size="70" value=""></td>
  4. </tr>

Now that you have the input, now you add this to wherever the hell you have the call to the paypal url with the encoded strings:

  1. $queryString = $_POST['querystrings'];
  2. QUERY_STRING = $queryString

great, now you have a variable QUERY_STRING to use inside. Now do this:

  1. https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&notify_url=' . urlencode(WEB_ROOT) . '&business=' . urlencode($paypalemailadd) . ' . urlencode(QUERY_STRING) . '&currency_code=' . urlencode(CURRENCY_CODE) . ' etc etc

Done! Ok so now after you added this code, I can go to:

  1. [http://mywebsite.com/whmcs]/configgateways.php?updated=paypal#m_paypal

Then I can scroll down to the input field:

  1. Query Strings (ADVANCED USERS ONLY)

Then I can add a string that I want like for example:

  1. &page_style=MyPaypalPageStyle&no_note=1&currency_code=

And then after clicking save, the new paypal URL will be something like this:

  1. https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&notify_url=http://mywebsite.com&[email protected]&page_style=MyPaypalPageStyle&no_note=1&currency_code=USD... etc etc

Notice how my new query string now shows up. This query string will allow me to pass advanced paypal variables safely like for example a custom branded payment page style named MyPaypalPageStyle which instead of showing my default logo it will show the logo of the specific website.

Otherwise, the entire WHMCS is useless if I can't do this simple feature.

Hopefully you can add this within the next few days. Please tell me when this major bug is fixed. If you won't fix even after I gave you the code to do it then I will be getting my full subscription refunded and going to your competitor instead. Thanks

Comments (4)

photo
1

Hello WHUser,

This site is not intended to provide technical support, but I wanted to take a moment to outline how you can accomplish your goals right now:

1) The link is returned as part of a form on the template (both when viewing an invoice and when emailing a link. You can use the replace function in smarty to insert your link. For example:

{$paypal_link_code|replace:'cgi-bin/webscr':'cgi-bin/webscr&page_style=xxxx'}

2) If you do not want to cary a custom template, we also provide the source code to modules to our customers upon request. If you open a support ticket, sign a NDA, and pay $75 you can get the source code to the paypal module and make this change right in the core code.

Going forward, I can see some value in having a configuration field in the module that allows you to optionally insert extra parameters. I would be happy to see that discussed in this feature request; however I think it needs a lot of editing to make that clear for other users who read it. What do you think is the best way forward to communicate that longer term goal?

photo
1

Hi you must have completely missed the point. This is NOT the funtionality I am referring to.

WHEN SOMEONE PURCHASES THROUGH A PURCHASE LINK ON MY WEBSITE THIS IS WHAT I AM REFERRING TO. NOT INVOICES!

Steps:

1) CREATE A PRODUCT

2) SOMEONE VISITS A PAGE AND CLICKS TO BUY

3) THEY ARE TAKEN TO PAYPAL AUTOMATICALLY

4) NO EMAIL LINKS OR INVOICES ARE CREATED EVER

Thus, this is NOT POSSIBLE unless you want to tell me a real solution.

photo
1

Tell me how to do this ASAP else I'm going to have to cancel my WHMCS subscription and no I am not paying an additional $75 for MANDATORY BASIC CORE ESSENTIAL FUNCTIONALITY.

Hopefully you can solve in the next 1 or 2 days else I will cancel my WHMCS subscription and go with your competitor since you blocked the ability to use the most basic functionality possible.

photo
1

Hi WHUser,

This request has been marked Already Possible. As stated by Nate, you can achieve the opening request's functionality through template modification. We understand the method of refinement that you are suggesting and may consider it for a future version of WHMCS. As much as we might desire, we do not accept, develop, and publish feature requests in one to two days.

If you wish to open a Support Ticket (https://whmcs.com/support/) and reference this Request (https://requests.whmcs.com/topic/mandatory-critical-bugfix-add-ability-to-add-query-strings-into-paypal), our Analysts and Developers would be happy to assist you further in applying the current method to achieve the desired affect.

Best Regards