% '************************************************************************** ' Version 6.50 ' we are now secure and in different session to need to reget info' ' after getting credit card details we update database with them ' unless the user has cancelled, in that case we delete order and items ' from the database ' If no prices, bypass asking for anything ' March 28, 2004 Support cookieless '************************************************************************* ' Change these dim sqltemp dim ScancelAction Dim AllowOtherPayment Dim AllowCreditCards, AllowInvalidCreditCards Dim encryptkey dim strocardissue dim oid dim dbc dim rstemp Dim strOcardtype Dim strOcardno Dim strOcardname Dim strOcardexpires Dim strOcardaddress Dim strOOther Dim StroMore Dim StrOAuthorization dim strOCardCVN dim sAction Dim CardTypes(10) Dim CardCount Dim OtherTypes(10) Dim OtherCount Dim PaymentURL dim strvalidfrom dim strocardmm,strocardyy Dim gateways ' '******************************************************* ' Specify credit cards, non credit cards and whether credit cards should be checked '******************************************************** AllowCreditCards=Getconfig("xallowcreditcards") ' Select credit Cards AllowOtherPayment=Getconfig("xallowotherpayments") ' Other payment types AllowInvalidCreditCards=Getconfig("xallowinvalidcards") ' validate credit card information gateways=getconfig("xgateways") paymenturl=getconfig("xpaymenturl") EncryptKey=getconfig("xEncryptKey") ' Get encrypt key Setsess "currenturl","shopcheckout.asp" setsess "followonurl","shopthanks.asp" SetSess "PaymentURL",paymentURL ' cardcount=0 If getconfig("Xcreditcardtypes")<>"" then parserecord getconfig("xcreditcardtypes"),cardtypes,cardcount,"," end if othercount=0 If getconfig("XOtherpaymenttypes")<>"" then parserecord getconfig("xotherpaymenttypes"),othertypes,othercount,"," end if GetOrderInfo ' get orderid sError=GetSess("PaymentError") ' on return for authorization there may be an error SetSess "PaymentError","" ' reset If getconfig("xDisplayPrices")<>"Yes" then responseredirect GetSess("followonurl") ' go to shopthanks end if 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 SetDefaultvalues DisplayForm() ' credit card form ShopPagetrailer ' trailer Else GetFormFields ValidateData if sError = "" Then UpdateCreditInfo ' add payment to daat base if paymentURL<>"" then ' if there is an authorization responseredirect PaymentURL & "?oid=" & oid else responseredirect GetSess("followonurl") ' go to shopthanks end if end if ShopPageHeader DisplayForm ShopPageTrailer end if '**************************************************** ' Put our credit card and non credit card form '************************************************* Sub DisplayForm if getconfig("xbreadcrumbs") = "Yes" then response.write "
" end if Response.write "