% '************************************************************************** ' Version 6.50 ' Used for gateways and shared SSL to display messages to customer and decide ' what to do. Customer can continue. In that case, they go back to sslshopcheckout.asp ' They can cancel the order ' Aug 16, 2003 '************************************************************************* Dim oid GetOrderInfo ' get orderid setsess "currenturl","ssldecline.asp" sError=GetSess("PaymentError") ' on return for authorization there may be an error SetSess "PaymentError","" ' reset sAction=Request.form("Action") if sAction="" then sAction=Request.form("Action.x") end if sCancelAction=Request.form("Cancel") if sCancelAction="" then sCancelAction=Request.form("Cancel.x") end if '***************************************************** ' see they pushed button or want form displayed '*************************************************** If sAction = "" and sCancelaction="" Then ShopPageHeader ' put out normal header DisplayForm() ' credit card form ShopPagetrailer ' trailer Else Validatedata ' see if canceled SetForwardUrl ' go back to sslshopcheckout responseredirect GetSess("followonurl") end if '***************************************************************** ' go back to sslshopcheckout to try again '***************************************************************** Sub SetForwardURL dim slash, url, ssl 'VP-ASP 6.50 - get checkout value from shop$config.asp rather than config table if xssl <> "" then ssl=xssl else ssl=Getconfig("xssl") end if 'ssl=getconfig("xssl") if ssl<>"" then slash=right(ssl,1) if slash="/" or slash="\" then else ssl=ssl & "/" end if end if ssl=ssl & "sslshopcheckout.asp" & "?oid=" & oid 'ssl=ssl & getconfig("xcheckout") & "?oid=" & oid setsess "followonurl",ssl end sub '**************************************************** ' Put our credit card and non credit card form '************************************************* Sub DisplayForm If SError<>"" then shopwriteError sError end if DisplayOptions Displaycancelbutton End sub ' '*************************************************** ' Display Options ' can add your own messages here '*************************************************** Sub DisplayOptions 'shopwriteheader getlang("langCreditCardFail") shopwriteheader "Use the continue button to try again." %> <% Response.Write("
" end Sub ' '*************************************************** ' Non credit card form '*************************************************** Sub DisplayCancelButton Response.Write("" end Sub Sub GetorderInfo ' Either comes on querystring or on rentry is in session variables oid=GetSess("oid") If oid="" then ' shoperror getlang("langCheckoutProcessed") end if end sub ' '********************************************************** ' did they select credit card or non credit card '********************************************************* Sub ValidateData ' see if user cancelled order dim rc, action dim cancelaction if sCancelaction <>"" then DeleteOrders ' delete order from database shoperror getlang("langCheckoutCancelled") end if end sub Sub DeleteOrders OpenOrderDB dbc CancelOrderRecord dbc,oid shopCloseDatabase dbc ShopCancelOrder end sub %>