Why I am getting this error on my Ecommerce(asp) Website.
Ecommrece Websitehttp://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 & "¬ify_url=" & notify_page
url = url & "&cancel_return=" & cancel_page
url = url & "&no_shipping=1"
url = url & "&no_note=0"
url = url & "¤cy_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.