Jump to content

peterbuzzin

Members
  • Content count

    75
  • Joined

  • Last visited

  • Days Won

    6

peterbuzzin last won the day on May 18

peterbuzzin had the most liked content!

1 Follower

Profile Information

  • Real Name
    Pete Batin
  • Gender
    Male
  • Location
    Kent, England
  • Website

Recent Profile Visitors

9,730 profile views
  1. peterbuzzin

    Access to Admin area /backstage

    Hi David, Sounds a little odd. Might be worth trying this before you attempt to log in. With the login form on screen press F12 on your keyboard which will open the Developer Tools window. Once open click on the Network tab, whilst you're here tick the "Disable Cache" checkbox (this maybe located elsewhere depending on what browser you use, my advice is based on Chrome). Then enter your login details and attempt to login. The network tab will show you everything it's attempting to download to display the next page. Check to see if there's anything hanging which is causing the page to not display whilst it waits for the download to finish. The other thing is that it could be a redirect loop, if you see the network tab keep displaying the same URL over and over again this would indicate a loop. It could also be stale cache, if it all of a sudden works then it may have been related to the "Disable Cache" which I said about earlier. If it still doesn't work try another browser. With regards to ad-hoc support, I may be interested. I'm a full time senior PHP developer for a digital marketing company (although offering this direct from myself and not via the company I work for) with over 18 years experience.
  2. peterbuzzin

    PayPal Express ~ Duplicate Orders

    Hi @burt I'm well aware of it but the request wasn't to create a module and I don't have time to do that for free at the moment either. Also it would not have worked in the OP's case, jQuery's script src is hardcoded into the OP's template_bottom.php file (sent via PM) and after the output of $oscTemplate->getBlocks('footer_scripts'); which is empty. So if it had been pulled via footer_scripts it would not have worked and console would have shown the error $ is not defined.
  3. @zefeena mcmannehan is partly correct, . You haven't said the specific WorldPay module you're using, so I'm going to use a little guesswork here but I've done my fair share of WorldPay integrations so should be ok and I'll assume the stock WorldPay/rbsworldpay module that comes with osC v2.3.4 bootstrap as per your sig. It could be one of the following: The customer is not being forwarded to checkout_process.php after payment and after being taken to hosted_callback.php from WorldPay Or there is an issue with your checkout_process.php file which isn't triggering the before_process() function in includes/modules/payment/rbsworldpay_hosted.php (or the issue could be in this file) So pinpointing the issue should be the first step and the following will provide me with some clues. Are some baskets being emptied and some not OR are all baskets not being emptied? Are order confirmation emails being sent to yourself and the customer when payment is successful? If you're happy to do so, please attach the following files and I'll take a look: /ext/modules/payment/rbsworldpay/hosted_callback.php /includes/modules/payment/rbsworldpay_hosted.php /checkout_process.php
  4. peterbuzzin

    PayPal Express ~ Duplicate Orders

    @pete2007 you're welcome
  5. peterbuzzin

    PayPal Express ~ Duplicate Orders

    Hi @pete2007 Thank you for sending the files in a PM. I've placed my response here so that if anyone else is in the same situation as you then they can see the solution also. Your store setup: Doesn't use or load jQuery UI jQuery and javascript is executed from includes/template_bottom.php and not in the <head> tag. Because of this, the script cannot be added directly to checkout_confirmation.php because jQuery loads after the contents of this page. Your site makes good use of a ext/jquery/main.js file instead of inline/on-page Javascript so we'll use this to house the new script. Your store submit button doesn't have any classes applied so no need to copy them to the new dynamic button before hiding the submit button once clicked. Please backup the ext/jquery/main.js file before making changes and be sure to test the checkout_confirmation.php page after making the changes as I've not been able to test this. You may also need to clear your temporary internet files/cache if your browser doesn't detect the additional code to the file immediately. In ext/jquery/main.js Go to the very bottom of the file after the closing }); and press return twice to create some spacing. Add the following, save and upload. /* BOF Prevent multiple form submissions from multiple clicks on checkout_confirmation.php */ if($('form[name=checkout_confirmation]').length > 0){ $('form[name=checkout_confirmation]').submit(function(){ var btnLoadingTxt = 'Loading Please Wait'; var confirmationForm = $(this); confirmationForm.find('button[type=submit]').each(function (index) { $(this).clone(false).attr('id', 'disabledBtn').prop('disabled', true).text(btnLoadingTxt).insertBefore($(this)); $(this).hide(); confirmationForm.prepend($(this)); }); }); } /* EOF Prevent multiple form submissions from multiple clicks */ Because we can't add this code directly to the checkout_confirmation.php page if left as it was it would attempt to execute on every page load. It would only work on the checkout_confirmation.php page but there's still no point taking extra resources to attempt to execute when not needed so I've added code to check if the confirmation form is present before execution.
  6. peterbuzzin

    PayPal App v5.018 Log In with PayPal is now dead

    Hi Phil, I'm not familiar with Frozen/patches but I'm sure it's/they're not too different. First question: can PayPal in Frozen auto-update like it can in the default/stock osC PayPal App? If it can then the change is likely to be overwritten at some point. If there's updates available it would be a good idea to update first and then apply the changes for the fix and then apply them to the repository of where the codebase lives for auto-update. I'm happy to look over this and use my code comparison tools. Again not familiar with Frozen but generally with osC it's best not to use naked $_POST/$_GET in code (as you're probably aware already) and as long as application_top.php is loaded before the PayPal files then those variables will available via $HTTP_POST_VARS and $HTTP_GET_VARS as declared by includes/functions/compatibility.php which also escapes special characters if need be.
  7. peterbuzzin

    PayPal Express ~ Duplicate Orders

    Hi, Sounds like you're not using v2.4.3.1 default install in that case. Can you post the contents of the bottom half of checkout_confirmation.php I don't need all of it, but if providing all of it is easier then do that. And/or post a link to your site so I can can make sure jQuery/jQuery UI is being used and where it's loaded in the page (I only need to look at the html source view of the index page in the browser for this). Alternatively if you're comfortable detecting where jQuery and jQuery UI is loaded yourself, find out if it's being loaded in <head> tags. If it's loaded in <head> tags then feel free to pasted that code anywhere towards the bottom of checkout_confirmation.php preferably after the closing </form> tag for the checkout confirmation page.
  8. peterbuzzin

    PayPal Express ~ Duplicate Orders

    @pete2007 You need some javascript/jquery to disable the button once clicked. In checkout_confirmation.php add this to the bottom of the page. I've made this based on a default install of v2.4.3.1 and will work providing your store still uses jQuery and jQuery UI Find: <script type="text/javascript"> $('#coProgressBar').progressbar({ value: 100 }); </script> Add this beneath it (do not replace, just add beneath): <script> $('form[name=checkout_confirmation]').submit(function(){ var btnLoadingTxt = 'Loading Please Wait'; var confirmationForm = $(this); $(this).find('button[type=submit]').each(function (index) { var btnHtml = $(this).html(); $(this).clone(false).attr('id', 'disabledBtn').prop('disabled', true).html(btnHtml).insertBefore($(this)); $('#disabledBtn .ui-button-text').text(btnLoadingTxt); $(this).hide(); confirmationForm.prepend($(this)); }); }); </script> With the above script, once the form is submitted it will copy the styling and text displayed of the original button, clone it and make the cloned button disabled. It then hides the original submit button and changes the text of the cloned button to "Loading Please Wait".
  9. peterbuzzin

    PayPal Standard 5.018 Update not working

    Hi @douglaswalker All cacerts work independent of PayPal (so yes it will work, just copy the contents out of cacert.pem and paste into paypal.com.crt), it contains encryption keys and allows secure communications between two different endpoints (remote servers/services for example). The server making a request will use one of the keys and the destination needs to have the corresponding matching key and if both are present then they can talk to each other securely. (If you open the file in Notepad or similar and look through it you'll see the keys and the Cert Authorities that provided them). Over time encryption keys are replaced or retired due to vulnerabilities or greater technology. If you continue using an old cacert you notice eventually that you'd be able to communicate with less and less endpoints (PayPal for example) as the destination endpoints will remove old keys and add new ones as time goes on. So unless you update the cacert every now and then you'll find you wont be able to communicate with the new keys because you don't have that key in your cacert. An example of this is if you download and install PayPall App it comes with a cacert but if you attempt to use the Test found in PayPal > Configure > General > SSL Version - Test Connection Button it will fail because the cacert that comes with the PayPal App is really old and most endpoints will refuse to support the keys in it. As soon as you upload a new one it will work again (providing you use TLS 1.2 setting as most don't support "Default" which I think is SSL2/3 which was retired some time ago and again something else that needs removing from the "official" App).
  10. peterbuzzin

    PayPal Standard 5.018 Update not working

    You should also replace the standard includes/cacert.pem with the latest one also if you haven't already, it gets used for curl operations within the store and it's way out of date too. You can download the latest version it from here https://curl.haxx.se/docs/caextract.html
  11. peterbuzzin

    PayPal Standard 5.018 Update not working

    Sorry to be a bit political and off-topic but that one person has a god complex, is a protectionist and it's annoyed me for almost 15+years. As a full time PHP developer myself I can appreciate it's his "baby" and he's probably made a lot of money indirectly from it (who wouldn't want it on their CV) and has lots of better opportunities to use his time on, but the "baby" is now neglected and if it were a real baby child protection would have stepped in a long time ago. His addons are protected so even when they no longer work because of service provider deprecation/changes or even have bugs (he's not perfect) nothing can be done to update them (Worldpay and PayPal App for example) but they're still advertised as the latest and official.
  12. peterbuzzin

    PayPal App v5.018 Log In with PayPal is now dead

    Hi MrPhil, If you need assistance, could you create a separate topic for it and provide the files, I may have time to look at it. This is intended for the default PayPal App v5.018 as found here https://apps.oscommerce.com/fZMiN&paypal-app (although you can't actually download v5.018 from here you have to auto-update once installed which has always bugged me, every version should be available on there. And another annoyance is when you download osCommerce 2.3.4.1 it doesn't come with the PayPal App). This will help keep this topic on point and prevent others who might be less technical from getting the code mixed up/confused.
  13. peterbuzzin

    PayPal App v5.018 Log In with PayPal is now dead

    It does indeed! The link generated by PayPal is dynamically produced from code and then inserted in the page on load. The link is something like <a id="LIwPP41972473" class="LIwPP_V2 PPBlue_V2 CWPP_rectangle CWPP_medium" text="Connect with PayPal" href="#"><lots of code in here></a>. Unfortunately because that link and html is generated at PayPal and sent back to the store there's not a lot that can be done to it. Notice the href="#" in the a tag? That's what's making it go to the homepage because the <base href="https://www.exoticincense.com/"> (in your case) is set to the domain root and relative URL's will always combine with the base href giving you https://www.exoticincense.com/#. You can't change this as it will break your CSS, JS and image paths etc. The second theory is that it's being done via PayPal javascript, but again because it's all generated by PayPal it's a lot of time/effort to look into and possibly change and my priority was to get it working again. However, things like this do trigger my OCD, so you never know I may update the post at some point with a workaround lol.
  14. peterbuzzin

    PayPal App v5.018 Log In with PayPal is now dead

    Please see my last post above. The forum changed 3 items of code when posting and may produce unpredictable results if left as is.
  15. peterbuzzin

    PayPal App v5.018 Log In with PayPal is now dead

    Hi, you are entirely correct, well spotted and that is odd! When using the code tags in this forum, if you edit the content of a code tag after setting it (which I did a few times), it translates the &amp; into &. Annoying!! Correct code below, unfortunately the forum isn't allowing me to edit my posts any longer. ANYONE READING THIS FOR THE FIRST TIME USE THE INSTRUCTIONS AND CODE BELOW AND NOT THE CODE ABOVE First of all in your store admin, make sure Telephone Number and Seamless Checkout is unticked, then save the settings. Note: Possible ongoing problems. Seamless checkout previously allowed users who have logged in via "Log In with PayPal" to continue to make payment without logging in again. As PayPal has removed Seamless as a scope item I'm not sure if customers will have to login again to PayPal once they get to payment method selection or click a Checkout with PayPal button. The new connect/api.js may compensate for this automatically but I haven't tested that far yet so cannot comment either way. In includes/modules/content/login/templates/paypal_login starting line 18 Find: <script type="text/javascript" src="https://www.paypalobjects.com/js/external/api.js"></script> <script type="text/javascript"> paypal.use( ["login"], function(login) { login.render ({ <?php if ( OSCOM_APP_PAYPAL_LOGIN_STATUS == '0' ) { echo ' "authend": "sandbox",'; } if ( OSCOM_APP_PAYPAL_LOGIN_THEME == 'Neutral' ) { echo ' "theme": "neutral",'; } ?> "locale": "<?php echo $cm_paypal_login->_app->getDef('module_login_language_locale'); ?>", "appid": "<?php echo (OSCOM_APP_PAYPAL_LOGIN_STATUS == '1') ? OSCOM_APP_PAYPAL_LOGIN_LIVE_CLIENT_ID : OSCOM_APP_PAYPAL_LOGIN_SANDBOX_CLIENT_ID; ?>", "scopes": "<?php echo implode(' ', $use_scopes); ?>", "containerid": "PayPalLoginButton", "returnurl": "<?php echo str_replace('&amp;', '&', tep_href_link(FILENAME_LOGIN, 'action=paypal_login', 'SSL', false)); ?>" }); }); </script> Replace with: <script type="text/javascript" src="https://www.paypalobjects.com/js/external/connect/api.js"></script> <script type="text/javascript"> paypal.use( ["login"], function(login) { login.render ({ <?php if ( OSCOM_APP_PAYPAL_LOGIN_STATUS == '0' ) { echo ' "authend": "sandbox",'; } if ( OSCOM_APP_PAYPAL_LOGIN_THEME == 'Neutral' ) { echo ' "theme": "neutral",'; } ?> "responseType" : "code id_Token", "locale": "<?php echo $cm_paypal_login->_app->getDef('module_login_language_locale'); ?>", "appid": "<?php echo (OSCOM_APP_PAYPAL_LOGIN_STATUS == '1') ? OSCOM_APP_PAYPAL_LOGIN_LIVE_CLIENT_ID : OSCOM_APP_PAYPAL_LOGIN_SANDBOX_CLIENT_ID; ?>", "scopes": "<?php echo implode(' ', $use_scopes); ?>", "buttonType" : "CWP", "buttonShape" : "rectangle", "buttonSize" : "md", "fullPage" : "false", "containerid": "PayPalLoginButton", "returnurl": "<?php echo str_replace('&amp;', '&', tep_href_link(FILENAME_LOGIN, 'action=paypal_login', 'SSL', false)); ?>" }); }); </script> In includes/modules/content/login/cm_paypal_login.php on line 259 (to prevent a blank/white screen once a user has logged in via PayPal when returning to the store). Find: echo '<script>window.opener.location.href="' . str_replace('&amp;', '&', $return_url) . '";window.close();</script>'; Replace with: echo '<script> if( typeof window.opener === \'undefined\' || window.opener === null ){ window.location.href="' . str_replace('&amp;', '&', $return_url) . '"; }else{ window.opener.location.href="' . str_replace('&amp;', '&', $return_url) . '"; window.close(); } </script>';
×