Copied to clipboard

Flag this post as spam?

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


  • Bex 444 posts 555 karma points
    Nov 30, 2011 @ 12:48
    Bex
    0

    Sagepay Always redirecting to Cancel Page

    Hello

    A long time ago I asked for a userguide for setting up sage page, unfortuantely that particular project is still on hold so I never got to try it.
    Now another project has come along that wants it but I can't get it working.

    When I try and place a test order, all it does it redirect to my cancel page!

    I have attached a screen shot of my set up.

    I only have the one payment method  and my script for sending to the payment is:

    /* The confirm order step of the cart */
    jQuery('a#confirmOrder').live("click"function ({
        var personalInformation jQuery("#personalInformation");

        /* We fetch the information from the form and creates
        an object that can be sent to the server as a form
        POST submit */
        var formObj {
            "firstName"personalInformation.find("#firstName").val(),
            "lastName"personalInformation.find("#lastName").val(),
            "email"personalInformation.find("#email").val(),
            "address1"personalInformation.find("#address1").val(),
            "address2"personalInformation.find("#address2").val(),
            "county"personalInformation.find("#county").val(),
            "postcode"personalInformation.find("#postcode").val(),
          "ISOCountryCode""GB"
        };
        //Simple validation
        var pageValidateText '';
        if (formObj.firstName === ''{
            pageValidateText += '\nFirst name';
        }
        if (formObj.lastName === ''{
            pageValidateText += '\nSurname';
        }
        if (formObj.email === ''{
            pageValidateText += '\nEmail';
        }
        if (formObj.address1 === ''{
            pageValidateText += '\nAddress1';
        }
        if (formObj.address2 === ''{
            pageValidateText += '\nAddress2';
        }
        if (formObj.county === ''{
            pageValidateText += '\nCounty';
        }
        if (formObj.postcode === ''{
            pageValidateText += '\nPostcode';
        }

        if (pageValidateText != ''{

            //The form does not validate and we pop up the result
            pageValidateText 'Remember to fill in:\n\n' pageValidateText;
            alert(pageValidateText);
        }
        else {
          
            /* The properties is sent to the server with a syncronous call
            This way we lock the UI and can redirect the user.*/
            TeaCommerce.updateOrderProperties(formObjfalse);
            TeaCommerce.setPaymentMethod(1false);
            TeaCommerce.goToPayment();
        }
        return false;
    });

     

    Can you see anything wrong?

     

    Thanks for your time

    Bex

     

  • Anders Burla 2560 posts 8256 karma points
    Nov 30, 2011 @ 13:01
    Anders Burla
    0

    Hi Bex

    Try and read this post and see if it helps you
    http://our.umbraco.org/projects/website-utilities/tea-commerce/tea-commerce-support/25693-SagePay-integration

    Kind regards
    Anders

  • Bex 444 posts 555 karma points
    Nov 30, 2011 @ 13:51
    Bex
    0

    Don't know how I missed that post! I did a search but it didn't come up!

    I'm not getting any errors appearing in the umbraco log so none the wiser?

    Maybe it's a sage pay problem?

    Don't know where to start!

  • Bex 444 posts 555 karma points
    Nov 30, 2011 @ 14:10
    Bex
    0

    Well OMG.. I just turned on firebug in chrome to see if that shed any light and the flipping thing goes through!??!

    Thanks for your help but it appears I didn't need it! :)

     

  • Anders Burla 2560 posts 8256 karma points
    Dec 03, 2011 @ 15:55
    Anders Burla
    0

    Glad you got it working :) Could you mark your own answer as the solution - just to help others :)

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft