Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

PayPal Working in FireFox but not IE7

Options
  • 28-06-2007 3:18pm
    #1
    Registered Users Posts: 527 ✭✭✭


    Ok so I thought I was finished my site.. I checked my page out in IE7 and I get the following message when I click the PayPal image/button.

    Session contains invalid data.

    I have 2 pages. Calc.html and success.html
    The value from a textfield in Calc is written to a cookie and then retrieved from the success page and passed to the PayPal form.
    Note the value of the textfield is a number in the format xx.xx

    Some code from Calc: (this works fine)
    function createCookie(name,value,days) {
    		if (days) {
    			var date = new Date();
    			date.setTime(date.getTime()+(days*24*60*60*1000));
    			var expires = "; expires="+date.toGMTString();
    		}
    		else var expires = "";
    		document.cookie = name+"="+value+expires+"; path=/";
    	}
    	
    	function readCookie(name) {
    		var nameEQ = name + "=";
    		var ca = document.cookie.split(';');
    		for(var i=0;i < ca.length;i++) {
    			var c = ca[i];
    			while (c.charAt(0)==' ') c = c.substring(1,c.length);
    			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    		}
    		return null;
    	}
    	
    	function eraseCookie(name) {
    		createCookie(name,"",-1);
    	}
    
    createCookie('ppCookie',bookingDep2,1);
    


    Som code from success:
    function setPPamount(){
    		var x = readCookie('ppCookie');
    		alert("Booking Deposit = &#8364;"+x);
    		document.ppForm2.amount.value = x;
    		eraseCookie('ppCookie');
    		
    }
    ...
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" name="ppForm2" id="ppForm2">
      <input type="hidden" name="cmd" value="_xclick" />
              <input type="hidden" name="bn" value="webassist.dreamweaver.4_0_3" />
              <input type="hidden" name="business" value="........" />
              <input type="hidden" name="currency_code" value="EUR" />
              <input type="hidden" name="undefined_quantity" value="0" />
              <input type="hidden" name="receiver_email" value="........" />
              <input type="hidden" name="mrb" value="....." />
              <input type="hidden" name="pal" value="......" />
              <input type="hidden" name="no_shipping" value="0" />
              <input type="hidden" name="no_note" value="0" />
              <input type="hidden" name="item_name" value="......" />
              <input type="hidden" name="amount" value= "" />
              <input type="image" name="ppButton" id="ppButton" src="http://images.paypal.com/images/x-click-but6.gif" border="0" alt="Make payments with PayPal, it's fast, free, and secure!" style="display:visible" onClick="setPPamount()"/>
    </form>
    

    It's strange that this works no problem in Firefox but yet IE7 I get that invalid session data error.

    Any help would be really appreciated before I remove anymore clumps of hair.

    Thanks


    Seán


Comments

Advertisement