Pensive Posted November 1, 2010 Share Posted November 1, 2010 (edited) Hi guys I first tried standard paypal. I found that most of the time, it would fail upon first attempt, taking you to https://www.mydomain.com/? So I'm now doing PayPal Website Payments Pro, and was then getting the following error, and it was reporting that it could not authenticate the error. Paypal Error code was : L_ERRORCODE0 => 10505 L_SHORTMESSAGE0 => Gateway Decline L_LONGMESSAGE0 => This transaction cannot be processed. L_SEVERITYCODE0 => Error L_ERRORPARAMID0 => ProcessorResponse L_ERRORPARAMVALUE0 => PPAV This was not in test mode and it was my card - it should have been authorised. So I assume - ok it must be 3d secure enabled on my card but not enabled in the gateway so I put the 3d secure version linked to by cardinal, with al lthe settings correct accoridng to their instructions. I run through, it gets to the page where it starts loading the 3dsecure stuff, with a big empty box, waits a few seconds, then dumps me back to https://www.mydomain.com/? without an error. The gateway log states "3d Auth" as the result, and it seems to be almost working: ERRORDESC => ERRORNO => 0 And a long payload string which i wont post here - it also detemrines my bank, so it has successfully queries my account and returned the need for 3d secure verification. Can I beg of your many moons of experience please: is it a) .htaccess rewrite rules messing up redirects? RewriteEngine On Options +FollowSymlinks RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} AuthName portal.mydomain.com # Announcements RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+\.html$ ./announcements.php?id=$1 [L,NC] RewriteRule ^announcements$ ./announcements.php [L,NC] # Downloads RewriteRule ^downloads/([0-9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^downloads$ ./downloads.php [L,NC] # Knowledgebase RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$ ./knowledgebase.php?action=displayarticle&id=$1 [L,NC] RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ ./knowledgebase.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC] b) Paypal gateway redirecting incorrectly / settings c) somethign esle? I dont think its the 3d secure, - it might be but I think its unlikely. Any ideas? I dont know whether to bother MAtt, Paypal, or Cardinal with a support ticket? None of the above was in test mode, I am actually working live right now as I find it reduces points of failure. Ill advised but effective. Any help from anyone would be awesome, thanks guys. Edited November 1, 2010 by Pensive 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted November 2, 2010 WHMCS Support Manager Share Posted November 2, 2010 Can you confirm that you've entered your System URLs in Setup > General Settings? With the regular PayPal gateway, what was the source code of the PayPal button code? If you suspect the htaccess file is the issue, maybe try restoring the default? 0 Quote Link to comment Share on other sites More sharing options...
Pensive Posted November 6, 2010 Author Share Posted November 6, 2010 OK Thanks John, I've done some further investigation: 1) removed RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} from .htaccess No effect - same issue 2) Reverted my url settings in general settings to WHMCS System URL is http://portal.mydomain.com/ WHMCS SSL URL is https://portal.mydomain.com/ Where before I had the https in both (redundant in conjunction with the settings in point 1 anyway) 3) Other settings: WHMCS domain: http://www.mydomain.com/ Should this be linking to my portal instead? I would be surprised if an addon / module was using this instead of my WHMCS system URLs, but its possible I guess. 4) Auto Redirect on Checkout is set to: "Automatically forward the user to the payment gateway" When attempting paypal website payments pro payment, the 3dsecure log still reads "3d Auth" error 0, no actual failure report - but redirects to "https://www.mydomain.com/?" as before (I have SSL redirects on my main website page as well, which could be removed temporarily if necessary - but nothing to do with the transaction should occur through that site - its on a different server). When attempting paypal, button code (with certain lines removed) is as follows: <table><tr><td><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="amount" value="11.74"> <input type="hidden" name="tax" value="0.00"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="https://portal.mydomain.com/viewinvoice.php?id=27"> <input type="hidden" name="cancel_return" value="https://portal.mydomain.com/viewinvoice.php?id=27"> <input type="hidden" name="notify_url" value="https://portal.mydomain.com/modules/gateways/callback/paypal.php"> <input type="hidden" name="bn" value="WHMCS_ST"> <input type="hidden" name="rm" value="2"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but03.gif" border="0" name="submit" alt="Make a one time payment with PayPal"> Obviously "mydomain" has been inserted to protect the security of the site in question. Paypal takes you through to paypal, I pay, and it redirects me to <meta http-equiv="refresh" content="5;url=https://portal.mydomain.com/viewinvoice.php?id=27&tx=0YF455633U4800837&st=Completed&amt=11.74&cc=GBP&cm=27&item_number="> And this time it succeeds and takes me back to the invoice, but it still reads unpaid. It should read paid surely - I have my API details correctly inserted into the settings. Clicking on the back to client area option, it has correctly set the invoice to paid, so the API settings are right. My experience tells me a new user signing up might not have success and would be returned to the strange redirect URL. So Paypal is working a bit (it is a 50/50 hit and miss affair - i will test a new user later and report back), but paypal wpp is still suffering from the same issue. Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
Pensive Posted November 6, 2010 Author Share Posted November 6, 2010 (edited) As I suspected: I signed up as a new user and it failed from the ajax order form, through the standard paypal payment option, retunring me to the same pointless URL with a questionmark in it. Filled out all details, and clicked the checkout button, which brought me to a redirect page with the following paypal button: <div align="center"><table><tr><td><form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="paymentfrm"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="me@mydomain.com"> <input type="hidden" name="item_name" value="Invoice #28"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="first_name" value="Jonathan"> <input type="hidden" name="last_name" value="Crimble"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="bn" value="WHMCS_ST"> <input type="hidden" name="a1" value="2.15"> <input type="hidden" name="p1" value="21"> <input type="hidden" name="t1" value="D"> <input type="hidden" name="a3" value="2.93"> <input type="hidden" name="p3" value="1"> <input type="hidden" name="t3" value="M"> <input type="hidden" name="src" value="1"> <input type="hidden" name="sra" value="1"> <INPUT TYPE="hidden" name="charset" value="utf-8"> <input type="hidden" name="custom" value="18"> <input type="hidden" name="return" value="https://portal.mydomain.com/viewinvoice.php?id=28"> <input type="hidden" name="cancel_return" value="https://portal.mydomain.com"> <input type="hidden" name="notify_url" value="https://portal.mydomain.com/modules/gateways/callback/paypal.php"> <input type="hidden" name="rm" value="2"> <input type="hidden" name="modify" value="1"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but20.gif" border="0" name="submit" alt="Subscribe with PayPal for Automatic Payments"> </form></td></tr></table></div> <form method="post" action="viewinvoice.php?id=28"></form> <br /><br /><br /> and the following autosubmit code: <script language="javascript"> setTimeout ( "autoForward()" , 5000 ); function autoForward() { document.forms[0].submit() } </script> When the autosubmit went though I was dumped to https://www.mydomain.com/? I have a maxmind account - could it be that? or are my paypal redirect settings incorrect? auto-return is on return url is https://portal.mydomain.com Please help me I'm totally at a loss right now..... Edited November 6, 2010 by Pensive 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted November 8, 2010 WHMCS Support Manager Share Posted November 8, 2010 3) Other settings: WHMCS domain: http://www.mydomain.com/Should this be linking to my portal instead? I would be surprised if an addon / module was using this instead of my WHMCS system URLs, but its possible I guess. Yes definitely enter a valid URL here. 0 Quote Link to comment Share on other sites More sharing options...
Pensive Posted November 8, 2010 Author Share Posted November 8, 2010 It's a valid url, but should it be portal.mydomain.com, or mydomain.com, or http://www.mydomain.com? Remeber:mydomain.com is (in ALL cases) replaced by my toplevel domain. 0 Quote Link to comment Share on other sites More sharing options...
Pensive Posted November 8, 2010 Author Share Posted November 8, 2010 I have these 2 URL settings: WHMCS System URL: http://portal.mydomain.com/'>http://portal.mydomain.com/ WHMCS SSL System URL: https://portal.mydomain.com/ and a third "domain" - the url to your website homepage What should I put in the "Domain" one? The manual doesnt tell me. my main website, or the portal address? http://www.mydomain.com or http://portal.mydomain.com or portal.mydomain.com or http://www.mydomain.com or domain.com? The possibilites are endless and the docs don't detail what it should be. For now it is literally the link to my website homepage including http://, but it does not link to the portal which is on a different server. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted November 8, 2010 WHMCS Support Manager Share Posted November 8, 2010 What's the actual URL of your WHMCS installation? Then we can advise. 0 Quote Link to comment Share on other sites More sharing options...
Pensive Posted November 8, 2010 Author Share Posted November 8, 2010 http://www.curioushippo.com is my main website on a windows 2008 server w/ SSL rewrites across the board. and whmcs install is on portal.curioushippo.com which resides on a linux server. many thanks 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted November 9, 2010 WHMCS Support Manager Share Posted November 9, 2010 So your System URL would be http://portal.curioushippo.com And the Domain would be http://www.curioushippo.com 0 Quote Link to comment Share on other sites More sharing options...
Pensive Posted November 9, 2010 Author Share Posted November 9, 2010 That's what I had in there already. I'll do a screencast as requested in the support ticket so you can see whats happening a little better. Also in the interests of simplicity I will concentrate on standard paypal. Fixing the problem there will liekly fix the problem elsewhere anyway. Thanks for your help so far. 0 Quote Link to comment Share on other sites More sharing options...
Pensive Posted November 13, 2010 Author Share Posted November 13, 2010 OK thanks to Matt and John the problem is now fixed. It turned out that if you have a form in your whmcs template, it can casue an issue. By default the payment redirect sends through form(0) - usually correct but if you have a form in your header.tpl in your template, the payment form becomes form(1), and the redirect is then sending the incorrect form through. you need to either 1) remove the form from your header.tpl (if it isnt needed) 2) open the forwardpage.tpl file in your custom template folder and where it has forms[0], change that to forms[1] Many thanks for Matt and John's patience - the problem was really my template and not whmcs at all. The moral of the story? - try the default template before raising a support ticket. Rgds Jon 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.