YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

We have detected a problem with this shopping cart. If the problem persists, please contact the merc Options
Shahnawaz
#1 Posted : Thursday, December 17, 2009 2:30:13 PM
Rank: Starting Member

Groups: Registered

Joined: 12/17/2009
Posts: 1
Location: Kuwait
Why I am getting this error on my Ecommerce(asp) Website.
Ecommrece Website

http://aspdemo.webng.com/ecom

Error : We have detected a problem with this shopping cart. If the problem persists, please contact the merchant.


The code is in my asp pay.asp page is given below

===========================================================================

<%@ Language=VBScript %>
<!--#include Virtual="_____14_/aspdemo/ecom/common/Common.asp" -->
<!--#include Virtual="_____14_/aspdemo/ecom/include/adovbs.inc" -->
<!--#include Virtual="_____14_/aspdemo/ecom/Include/site-Config.asp"-->
<%
Response.Expires = 0
Response.ExpiresAbsolute = Now - 10
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", "private"
Response.CacheControl = "no-cache"
Response.Buffer=True

' Declare our Vars
'Dim dictCart ' as dictionary
Dim sAction ' as string
Dim iItemID ' as integer
Dim iItemCount ' as integer

' ***** Begin the infamous runtime script *****
If IsObject(Session("cart")) Then

Set dictCart = Session("cart")

If dictcart.Count=0 then
Response.Redirect("Catalog.asp?Message=Sorry ! Your Shopping cart is empty")
Else

Set rsall = server.CreateObject ("ADODB.RecordSet")
Set rs = server.CreateObject ("adodb.recordSet")
rs.ActiveConnection=Cnn
rs.Open "Select * from tblProducts"


' Get a reference to the cart if it exists otherwise create it
If IsObject(Session("cart")) Then
Set dictCart = Session("cart")
Else
Set dictCart = Server.CreateObject("Scripting.Dictionary")
End If



' prevent fill with
' products code and quantity separated by comma
' eg: 001,1,002,003,4 ecc.
' ^ ^
' | |- quantity
' |- product code
'

' open database
if err.number <> 0 then
Set cnn = nothing
Response.Redirect "error.asp"
end if


' paypal account informations
my_paypal_email = mypaypal_EmailId

' my domain informations
Server_Name=Request.ServerVariables("HTTP_HOST")
return_page = "http://"&Server_Name&"/Ecom/notify.asp"
notify_page = "http://"&Server_Name&"/Ecom/notify.asp"
cancel_page = "http://"&Server_Name&"/Ecom/cancel.asp"

' my currency value
currency_type = "USD"


' DeActivate Sanbox testing URL of PAYPAL PAYMENT GATEWAY to Activate REALTIME PAYPAL PAYMENT GATEWAY
'url = "https://www.sandbox.paypal.com/cgi-bin/webscr"
' Activate REALTIME PAYPAL PAYMENT GATEWAY URL to Activate Realpaypal Gateway
url = "https://www.paypal.com/cart/"
'define the link to call
url = url & "?business=" & my_paypal_email
url = url & "&upload=1"
url = url & "&cmd=_cart"
url = url & "&return=" & return_page
url = url & "&notify_url=" & notify_page
url = url & "&cancel_return=" & cancel_page
url = url & "&no_shipping=1"
url = url & "&no_note=0"
url = url & "&currency_code=" & currency_type
'OPTIONAL PARAMETERS
'url = url & "handling_cart="
'url = url & "tax_cart="
url = url

' Retrieve cart from session
Dim item_count
For Each Key in dictCart
'--------------Set Currency to US Dollar---------------
Setlocale(1033)
'--------------Set Currency to US Dollar---------------

aParameters = GetItemParameters(Key)
price=formatcurrency(aParameters(2),2)
'Url for Paypal
item_count = item_count + 1
' fills the call with code and quantity
url = url & "&item_number_" & item_count & "=" & Key
url = url & "&item_cod_" & item_count & "=" & Key
url = url & "&quantity_" & item_count & "=" & dictCart(Key)
' complete the call with description and price
url = url & "&item_name_" & item_count & "=" & aParameters(0)
url = url & "&amount_" & item_count & "=" & price
Next


Function GetItemParameters(iItemID)
' Retrieve cart from session
For i = 0 to dictCart.Count -1
rsall.Open "Select * from tblProducts where ProductId = '" & iItemID & "'",Cnn,adOpenDynamic ,adLockPessimistic
prName=Replace(rsall.Fields("Productname")," ","_")
aParameters = Array(trim(Left(prName,100)),trim(Left(rsall.Fields("Description"),100)),trim(rsall.Fields("Price")))
GetItemParameters = aParameters
rsall.Close
Next
End Function

'response.Write url
'response.End()

' close database
cnn.Close
Set cnn = nothing

' call paypal page
response.redirect url

End If
Else
Response.Redirect("Catalog.asp?Message=Sorry ! Your session has expired<br /> Please Try Again")
End If
%>

================================================================================



Please help me to resolve this paypal errror.
Sponsor  
 
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.3 | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.167 seconds.