Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjarne Fyrstenborg 1285 posts 4039 karma points MVP 8x c-trib
    Mar 19, 2012 @ 01:06
    Bjarne Fyrstenborg
    0

    ePay continue url and popup

    Hi

    I am trying to configurate the ePay settings with a test account, but I have I problem with using popup window as in the demo on ePay's site: http://www.epay.dk/eksempler/proev-epay-standard-betalingsvinduet.asp

    When I set value to 1 (popup = true) and include the script: <script type="text/javascript" src="http://www.epay.dk/js/standardwindow.js"></script> in <head> it seems to ignore it and have same effect as when I set value to 2.

    After payment step it close the ePay site, but it doesn't seem to redirect to my confirmation url: http://sub.ak-security.dk/da/kurv/bekraeftelse.aspx .

    Am I missing something?
    You're welcome to test the steps here: http://sub.ak-security.dk/da/shop.aspx which just use the ePay test account for payment right now.

    Bjarne

  • Anders Burla 2560 posts 8256 karma points
    Mar 19, 2012 @ 09:17
    Anders Burla
    1

    Hi Bjarne

    Its because our starter kit supports server side fallback but ePay only works with javascript so you have to do some additional work with ePay. You can do two things. You can remove the "GetPaymentForm" from step 4 and instead call the javascript metod "goToPayment" when the user clicks. This will call the "open_ePay_window()" method automatically. You can also change your javascript code to call "open_ePay_window()" when the user clicks the button.

    Kind regards
    Anders

  • Bjarne Fyrstenborg 1285 posts 4039 karma points MVP 8x c-trib
    Mar 19, 2012 @ 19:39
    Bjarne Fyrstenborg
    0

    Hi Anders

    Thanks for your help.. it works great now :)

    It was redirecting to the cancel url before, when I canceled the order from ePay.. it works as it should now, and I also see a difference now, where it before just opened a new window/tab in both cases it now either open a popup window.. or use the same window for payment.

    I find the easiest way to call the goToPayment from javascript, where I also check if the user has accepted/checked the terms:

    jQuery("#cart.stepProgress4 #next").live("click"function ({

      //Validation
      var pageValidateText '';
      
      //youMustAcceptTerms is a global variable to get the dictionary item in the template before this file is loaded.
      
      if (!jQuery('[name=acceptTerms]:checked')[0]{
        pageValidateText += youMustAcceptTerms;
      }
      if (pageValidateText != ''{
        pageValidateText pageValidateText;
        alert(pageValidateText);
        return false;
      }
      TeaCommerce.goToPayment();
      
    });

    Bjarne

     

Please Sign in or register to post replies

Write your reply to:

Draft