The orders are generating accurately. The code after returning from paypal is as follows.
Expand|Select|Wrap|Line Numbers
- <!--#include file="../includes/connection1.asp"-->
- <!--#include file="Cart_Include.asp"-->
- <%
- ' read post from PayPal system and add 'cmd'
- str ="cmd=_notify-validate&"& Request.QueryString
- ' post back to PayPal system to validate
- set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
- 'objHttp.open "POST", "https://www.sandbox.paypal.com/cgi-bin/webscr", false
- objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false
- objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
- objHTTP.setRequestHeader "Content-Length", Len(str)
- objHttp.Send str
- if (objHttp.status <> 200 ) then
- ' HTTP error handling
- Response.write "An Error Occured"
- elseif (objHttp.responseText = "VERIFIED") then
- if request("Payment_Status") ="Completed" then
- orderstatus=2
- msg="error=Congratuation, Your Credits has been upgrated
- successfully"
- else
- orderstatus=1
- msg="error=Your Payment status is Pending, As Soon as it is verified we will send you a confirmation Email."
- end if
- set rs=server.createobject("adodb.recordset")
- sql="select * from orders"
- rs.open sql,conn,3,3
- rs.addnew
- rs("order_price")=request("mc_gross")
- rs("contactname")=request("first_name") & " "& request
- ("last_name")
- rs("address")=request("address_street")
- rs("city")=request("address_city")
- rs("country")=request("address_country")
- rs("zip")=request("address_zip")
- rs("order_quantity")=request("custom")
- rs("order_status")=orderstatus
- rs("email")=request("payer_email")
- rs("order_date")=paymentdate
- rs.update
- set rs=nothing
- Call InsetOrderDetails()
- response.Redirect("mesg.asp?"& msg)
- else
- response.Redirect("mesg.asp?error=Error on receiving information, please contact to Admin")
- end if
www.paypal.com/cgi-bin/webscr. after receiveing data from paypal the else statement are execute such as
response.Redirect("mesg.asp?error=Error on receiving information, please contact to Admin").
The orders are not generating by using www.paypal.com/cgi-bin/webscr.
Please Help Me.
Thank You
Mehtab Khan.