@angelleye wrote: Can you provide a copy of the request so we can see the value being passed for the amount? Apparently there must be something incorrect about that value. thanks angelleye. do you mean a copy of the code? I am using simplecart for the store and when I click on the proceed to checkout I am receiving a message branded with Paypal logo saying "We're sorry, things don't appear to be working at the moment. Please try again later." Below is the code for one of the products - all the others have the same cost and use the same code with only product name changing: <div class="clear"></div> <ul class="buttons"> <li class="left"><a class="ovalbutton price_button" href="#"><span>$ 5.50 + $1 p&h</span></a></li> <li class="right"><a href="#" class="ovalbutton cart_button" onclick="simpleCart.add('name=mccrae ', 'price=6.50','quantity=1','thumb=images/thumb4.gif');" ><span>Add to cart</span></a> </li> </ul> <div class="clear"></div> I have attached the javascript text below: (hope this is what you are after) I had to change my email address in code to simonat rather than simon@ to get the msg thru var NextId=1,Custom="Custom",GoogleCheckout="GoogleCheckout",PayPal="PayPal",Email="Email",AustralianDollar=AUD="AUD",CanadianDollar=CAD="CAD",CzechKoruna=CZK="CZK",DanishKrone=DKK="DKK",Euro=EUR="EUR",HongKongDollar=HKD="HKD",HungarianForint=HUF="HUF",IsraeliNewSheqel=ILS="ILS",JapaneseYen=JPY="JPY",MexicanPeso=MXN="MXN",NorwegianKrone=NOK="NOK",NewZealandDollar=NZD="NZD",PolishZloty=PLN="PLN",PoundSterling=GBP="GBP",SingaporeDollar=SGD="SGD",SwedishKrona=SEK="SEK",SwissFranc=CHF="CHF",USDollar=USD="USD"; function Cart(){ var me = this; /* member variables */ me.Version = '2.0.1'; me.Shelf = new Shelf(); me.items = {}; me.isLoaded = false; me.pageIsReady = false; me.quantity = 0; me.total = 0; me.taxRate = 0; me.taxCost = 0; me.shippingFlatRate = 0; me.shippingTotalRate = 0; me.shippingQuantityRate = 0; me.shippingRate = 0.; me.shippingCost = 95; me.currency = AUD; me.checkoutTo = PayPal; me.email = "simonatwaydesigns.com.au"; me.merchantId = ""; me.cartHeaders = ['Image','Name','Price','Quantity','Total']; /****************************************************** checkout management ******************************************************/ me.checkout = function() { if( simpleCart.quantity === 0 ){ error("Cart is empty"); return; } switch( simpleCart.checkoutTo ){ case PayPal: simpleCart.paypalCheckout(); break; case GoogleCheckout: simpleCart.googleCheckout(); break; case Email: simpleCart.emailCheckout(); break; default: simpleCart.customCheckout(); break; } }; me.paypalCheckout = function() { var me = this, winpar = "scrollbars,location,resizable,status", strn = "https://www.paypal.com/cgi-bin/webscr?cmd=_cart" + "&upload=1" + "&business=" + me.email + "¤cy_code=" + me.currency, counter = 1, itemsString = ""; if( me.taxRate ){ strn = strn + "&tax_cart=" + me.currencyStringForPaypalCheckout( me.taxCost ); } for( var current in me.items ){ var item = me.items[current]; var optionsString = ""; for( var field in item ){ if( typeof(item[field]) != "function" && field != "id" && field != "price" && field != "quantity" && field != "name" && field != "shipping") { optionsString = optionsString + ", " + field + "=" + item[field] ; } } optionsString = optionsString.substring(2); itemsString = itemsString + "&item_name_" + counter + "=" + item.name + "&item_number_" + counter + "=" + counter + "&quantity_" + counter + "=" + item.quantity + "&amount_" + counter + "=" + me.currencyStringForPaypalCheckout( item.price ) + "&on0_" + counter + "=" + "Options" + "&os0_" + counter + "=" + optionsString; counter++; } if( me.shipping() != 0){ itemsString = itemsString + "&item_name_" + counter + "=Shipping" + "&item_number_" + counter + "=" + counter + "&quantity_" + counter + "=1" + "&amount_" + counter + "=" + me.currencyStringForPaypalCheckout( me.shippingCost ); } strn = strn + itemsString ; window.open (strn, "paypal", winpar); }; me.googleCheckout = function() { var me = this; if( me.currency != USD && me.currency != GBP ){ error( "Google Checkout only allows the USD and GBP for currency."); return; } else if( me.merchantId === "" || me.merchantId === null || !me.merchantId ){ error( "No merchant Id for google checkout supplied."); return; } var form = document.createElement("form"), counter = 1; form.style.display = "none"; form.method = "POST"; form.action = "https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/" + me.merchantId; form.acceptCharset = "utf-8"; for( var current in me.items ){ var item = me.items[current]; form.appendChild( me.createHiddenElement( "item_name_" + counter, item.name ) ); form.appendChild( me.createHiddenElement( "item_quantity_" + counter, item.quantity ) ); form.appendChild( me.createHiddenElement( "item_price_" + counter, item.price ) ); form.appendChild( me.createHiddenElement( "item_currency_" + counter, me.currency ) ); form.appendChild( me.createHiddenElement( "item_tax_rate_" + counter, me.taxRate ) ); form.appendChild( me.createHiddenElement( "_charset_" , "" ) ); var descriptionString = ""; for( var field in item){ if( typeof( item[field] ) != "function" && field != "id" && field != "quantity" && field != "price" ) { descriptionString = descriptionString + ", " + field + ": " + item[field]; } } descriptionString = descriptionString.substring( 1 ); form.appendChild( me.createHiddenElement( "item_description_" + counter, descriptionString) ); counter++; } document.body.appendChild( form ); form.submit(); document.body.removeChild( form ); }; me.emailCheckout = function() { return; }; me.customCheckout = function() { return; };
... View more