Jump to content

WHMCS + PayPal broken today


ramnet

Recommended Posts

For the last 12 hours the WHMCS PayPal payment gateway has been broken.

 

Talking with other hosts I am not the only one affected by this.

 

The issue is that WHMCS passes the "lc" variable to PayPal's website. After doing some tests, if in my code I don't pass this variable to PayPal's website, it is working perfectly today.

 

Perhaps it's time for the WHMCS developers to remove the LC variable from the PayPal gateway module?

 

Edit: This appears to primarily affect users from non-English countries as WHMCS will send an LC for a foreign language.

Edited by ramnet
Link to comment
Share on other sites

"lc" is a valid variable as per PayPal's documentation. Provided that the value being passed by WHMCS is valid, then the issue would be with PayPal and not with WHMCS.

 

With that said, even if the value were invalid, PayPal should display the checkout page in the default language of the seller's country; from what I recall of what PP_MTS_Chad had said in a prior posting at the PayPal developer network anyway.

 

My best guess at the moment would be that it's a PayPal issue rather than a WHMCS issue. However, I've not experienced this with any payments as of yet to say for certain.

Edited by GGWH-James
Link to comment
Share on other sites

Aye, it's a PayPal issue.

 

I initially thought it was a whmcs issue since Ubersmith was working fine.

 

loc=CN is the only language having an issue. Apparently changing this to loc=HK is a temporary fix.

 

http://www.hostloc.com/thread-68549-1-1.html

 

The fact that this is still broken 3 days later says a lot about how much PayPal cares about this.

Link to comment
Share on other sites

According to PayPal Support(over phone), the LC variable is meant to identify the language that you are using to send them data, not to identify the customer's language.

 

I fixed the issue by editing the viewinfoice.tpl file and changing {$paymentbutton} to {$paymentbutton|regex_replace:'/<input type="hidden" name="lc" value="[^"]*">/i':''}

 

This isn't exactly a great fix, but it will keep the issue from preventing customer payments until WHMCS can fix.

Link to comment
Share on other sites

Hi,

 

we run into the same issue; implemented the following as a hotfix:

 

- edit the template file viewinvoice.tpl

- replace {$paymentbutton} by the following block:

 

{php}
$paymentbutton = $GLOBALS["smarty"]->get_template_vars('paymentbutton');
if ( preg_match('/form action="https:\/\/www.paypal.com/', $paymentbutton) ) {
	$paymentbutton = preg_replace('/<input type="hidden" name="lc" value="[^"]+">/', '', $paymentbutton);
}
print $paymentbutton;
{/php}

Hope that helps!

 

Best,

-jens

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