% ' PAYMENT _RVK_080_Payment.asp
'PSR.109 cc validation
'response.write "nndndndn OFFERorRESA="&SESSION("OFFERorRESA") & " - ApplicationType="&SESSION ("ApplicationType")
response.write "
suppress ALEC cc validation if OFFER"
AspName = "_RVK_080_Payment.asp"
AspTitle = "Payment"
RedirectNextAspName = "_RVK_085_Congratulations.asp"
RedirectAnotherResa = "_RVK_001_START.asp?AnotherResa=true"
%> <%
IF SESSION("AspName") <> AspName THEN ' very first time = question on multiple RESA
AspTitle = "Another reservation ?"
END IF
'#####################################################################################################
'///////////////////////////////////////////////////////////////////////////////////////////////////
'///////////////////////////////////////////////////////////////////////////// A S P APPLICATION
'///////////////////////////////////////////////////////////////////////////////////////////////////
'################################################################################ CONFIRM CHECKS
IF REQUEST("FinishPayment") = "CONFIRM" THEN
ErrorMessageConditions = ""
'------------------------------------------------------------------ Check ticks PAYMENT MODE
SESSION("SubmitACCEPT")=FALSE
IF REQUEST ("PaymentModeSelected")= "" THEN
MSGerrorPayment="ERROR: NO payment mode selected"
ErrorMessageConditions = MSGerrorPayment
ELSE
SESSION("PaymentModeSelected")=REQUEST ("PaymentModeSelected")
SESSION("CreditCardSelected")=""
IF LEFT(SESSION("PaymentModeSelected"),2)="CC" THEN ' CC selected
NiceNameLength=LEN(SESSION("PaymentModeSelected"))-3 ' minus CC_
SESSION("CreditCardSelected")=RIGHT(SESSION("PaymentModeSelected"),NiceNameLength)
ELSE
SESSION("SubmitACCEPT")=TRUE ' OK for other payment then CC
END IF
END IF
'-------------------------------------------------------------- Check ticks General Conditions
' ------------------- TICK TravelPaper
FORMBOX_TP= "FormBoxTicked"
Checked_TP = "checked"
IF REQUEST("TickTPconditions") <> "on" THEN
ErrorMessageConditions = "ERROR: TravelPaper.com General Conditions not accepted"
FORMBOX_TP= "FormBoxInError"
Checked_TP = ""
END IF
' ------------------- TICK TravelPaper
FORMBOX_Entity = "FormBoxTicked"
Checked_Entity = "checked"
IF REQUEST("TickENTITYconditions") <> "on" THEN
ErrorMessageConditions = ErrorMessageConditions & "
ERROR: " &_
SESSION("CustomerPaysTO_TEXT") & " General Conditions not accepted"
FORMBOX_Entity = "FormBoxInError"
Checked_Entity = ""
END IF
END IF
'######################################################################################################
'########################################################################## E X I T
'########################################################################## R E D I R E C T
'######################################################################################################
IF REQUEST("FinishPayment") = "CONFIRM" AND ErrorMessageConditions = "" THEN
IF REQUEST ("PaymentModeSelected") = "CCcard" THEN
RedirectNextAspName = "_RVK_082_CCvalidation"
END IF
'response.write "
--------------- mndsmnasdmnsm------- "&RedirectNextAspName
RESPONSE.redirect RedirectNextAspName
END IF
'######################################################################################################
TracingMessage=" START _RVK_080_Payment.asp"&_
" -- SESSION(PaymentModeSelected) =" & SESSION("PaymentModeSelected")&_
" - PaymentFirstTime="&SESSION("PaymentFirstTime") & " -- FirstTime="&FirstTime
InformativeMessage = InformativeMessagePROCESS(1,TracingMessage,InformativeMessage)
'---- INITs
BlockAlign = "RIGHT"
DefaultNBdaysOFFER = 2
MSGerror=""
'FirstTime = TRUE
IF SESSION("displaytracing")=TRUE THEN
response.write " " &_
"
---- revoir tous les test date validity CC et amount . actuellement for hotel only
and button back? "&_
" "
END IF
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ F I R S T T I M E
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IF FirstTime = TRUE THEN
' ------------------------------------------ RESELLER & PAYS to
%> <%
IF SESSION("ResellerID") > 0 THEN
%> <%
ELSE
'SESSION("CustomerPaysTO_TEXT") = ""
END IF
' ------------------------------------------ some inits
SESSION("PaymentFirstTime")=FALSE
SESSION("PaymentModeSelected")="" ' will be CC or BK or POST or OTHER
SESSION("SubmitACCEPT")=FALSE
' ------------------- Firt time after VALIDATE
FORMBOX_TP= ""
Checked_TP = ""
FORMBOX_Entity = ""
Checked_Entity = ""
ErrorMessageConditions = ""
'========================================================== UPADTE RESAmain (CID and Made BY)
' Input required : RESAmainID (=SESSION("NewRESAID"))
' ReservationMadeByEXTid
' CustomerEXTid
RESAwriteMODE = "UPDATEcustomerANDmadebyID"
ReservationMadeByEXTid = SESSION("RESAmadeByEXTid")
CustomerEXTid = SESSION("CustomerEXTid")
%><%
'======================================================================== UPDATE Hotel prices in
' HL_ReservationsDetails (room price) if Accommodation
IF SESSION("NewRESAID") > 0 THEN
' -----------------------------------------------------------for NON APPARTMENTS, update taxes
IF SESSION("HotelTypeSector") <> "A" THEN
' ----- Get TAXES
INPUTinternalResaID = SESSION("NewRESAID")
Hotel_ID = SESSION("HotelID")
'MODEprice="Details"
%><%
' ----- Update Resa details
RESAwriteMODE = "UPDATEprices" ' all prices for hotels .....
PriceTAX= TotalTAX ' from RESApricingTOTAL.inc.asp
PRICEsupplements = SESSION("TotalAmountSupplements")
FullPrice = -1 ' do not update, assume done before
%><%
' for no APPARTMENTS
ELSE
' -----------------------------------------------------------for APPARTMENTS , all prices
RESAwriteMODE = "UPDATEprices" ' Grand total
FullPrice = SESSION("GrandTotalRESA")
NBincludedInPrice=1 ' no importance
PRICEdiscounts=0 ' not implemented yet
PRICEsupplements=0
PriceTAX= 0 ' not implemented yet
PRICEshortCurrency= SESSION("Total_PRICE_CURR")
%><%
END IF
END IF
'================================================================== Calculate full price Accommodation
IF SESSION("NewRESAID") > 0 THEN ' Accommodation
SQL="SELECT * FROM HL_ReservationsMain, HL_ReservationsDetails "&_
" WHERE ReservationsMain_ID = ReservationsMainID " &_
" AND ReservationsMainID = " & SESSION("NewRESAID")
SET RS_Res=DBCONN.Execute(SQL)
SESSION("Total_Price") = RS_Res("PRICEroom") + RS_Res("PRICEsupplements") + RS_Res("PRICEtaxes")
SESSION("Total_CURR") = RS_Res("PRICEshortCurrency")
ELSE ' anything else than Accommodation
END IF
'======================================================================= UPDATE BookingFile
' with total Price / Curr /cust
' Total Price for one BF = SESSION("Total_Price")
' Total Price CURRENCY = SESSION("Total_CURR")
ODBC_Kernel_Option = "FileUpdate"
TotalRESAvalueCURR= SESSION("Total_Price_CURR")
CustomerEXTid=ExternalIDcodeDecode(SESSION("CustomerID"),"C1","Code")
%><%
END IF ' on FirstTime
' LOGIC RESELLER DEFINE:----------------------------------------------------------------------
' RESELLER can be only AG table (with AG conditions (not done yet) OR AG/TO conditions (done))
' NOTE: RESELLER select option required for ALL entities EXCEPT Reseller (AG TABLE)
' 1. LOGGED CU >> PROVIDER (i.e.TO): direct or choosen RESELLER
' RESELLER = 0 direct, CU pays direct / full to PROVIDER = FULL display of Payment Cond.
' or RES. ID if choosen, CU pays direct / full to Reseller = FULL display of Payment Cond.
' and invoice PROVIDER >> RESELLER at RESELLER cond. ( - comm.)
' 2. LOGGED RESELLER (AG table .. for CU) >> PROVIDER (TO, HL..)
' RESELLER = Logged RES.ID, cannot choose another reseller!
' 3. LOGGED PROVIDER (i.e.TO, HL, for CU on telephone) direct or choosen RESELLER
' RESELLER = 0 direct, or RES. ID if choosen
' LOGIC RESELLER PAYMENT / END RESA PROCESS:--------------------------------------------------
' PAYMENT & INVOICES
' IF RES. ID > 0 pay to RESELLER at RESELLER Conditions @@@@@@ OK so far for Reseller in TO network
' by CU only, 2 Invoices: RESELLER to CU (Full price) AND
' PROVIDER to RESELLER (Full PROVIDER Full price - less comm)
' IF RES. ID = 0 pay to PROVIDER at PROVIDER Conditions @@@@@@ OK so far for Reseller in TO network
' by CU only, 1 Invoice: PROVIDER to CU (Full price)
' Display PAYMENT
' A L W A Y S : show request payment modes & Conditions only (RESELLER OR PROVIDER cond.) for CU PAYMENT
' LOGGED CU: Do not show PROVIDER INVOICE message IF RESELLER ID > 0
' EXIT FINISH
' 1. IF RESELLER ID > 0 (Choosen or logged): RESERVATION ,
' si PAY CC : Debit CC selon conditions (advanced) and Confirm RESA (Timestamp=0),
' si pay other: pas de debit, attente payment selon conditions, NO Confirm RESA
' 2. IF logged = "CU" >> Reseller: RESERVATION ,
' Redirect Congrat CU
'=======================================================REBUMP Date Time Stamp, hotel only
IF SESSION("NewRESAID") > 0 THEN ' this is a HOTEL RESA
RESAwriteMODE = "RebumpDateTimeStamp"
RESAmainID=SESSION("NewRESAID")
%><%
END IF
'====================================================================================== GET Customer
SQL = "SELECT * FROM CU_CustomersMain WHERE CustomerMainID="&_
SESSION("CustomerID")
SET RS_Customer=DBCONN.Execute(sql)
'===================================================================================== RESA or OFFER
'IF LEFT(SESSION("OFFERorRESA"),2) = "OF" THEN ' this is an OFFER
' SESSION("NOpaymentConditions")=TRUE
' SESSION("SubmitACCEPT")=TRUE
' SESSION("PaymentModeSelected")="OFFER"
' RS_ConditionsEOF = TRUE
'ELSE ' This is a RESERVATION, PAYMENT APPLIES
'======================================================= Define which Pay_Contitions DB table to use
' for show payment conditions
' RESELLER conditions if set or PROVIDER conditions if not
' SESSION("RESELLER_ExtID") or SESSION("PROVIDER_ExtID")
' SESSION("RESELLER_Name") or SESSION("PROVIDER_Name")
' SESSION("RESELLERID")
IF SESSION("RESELLER_ExtID") <> "" THEN ' --------------------------------- RESELLER SELECTED
' Select RESELLER payment conditions
PaymentCUtoENTITYname="RESELLER "&SESSION("RESELLER_Name") ' CU pays to RESELLER
sqlCOND= " SELECT * FROM AG_ConditionsPayment " &_
" WHERE AgencyMain_ID = " & SESSION("RESELLERID")
END IF
IF SESSION("RESELLER_ExtID") = "" THEN ' --------------------------------- NO RESELLER >> PROVIDER
' Select PROVIDER payment conditions
' CU PAys to PROVIDER direct
ProviderID= ExternalIDcodeDecode(SESSION("PROVIDER_ExtID"),"","Decode")
SELECT CASE LEFT(SESSION("PROVIDER_ExtID"),1)
CASE "H" sqlCOND= " SELECT * FROM HL_ConditionsPayment " &_
" WHERE HotelMainID = " & ProviderID
PaymentCUtoENTITYname="Accommodation "&SESSION("PROVIDER_Name")
CASE "T" sqlCOND= " SELECT * FROM TO_ConditionsPayment " &_
" WHERE TOMain_ID = " & ProviderID
ADDname=" (TO)"
CASE "P" sqlCOND= " SELECT * FROM AP_ConditionsPayment " &_
" WHERE AppartmentOwnerMainID = " & ProviderID
ADDname=" (Private)"
END SELECT
ModeGetInfo = "ExtID"
EntityExtID= SESSION("PROVIDER_ExtID")
%><%
PaymentCUtoENTITYname=EntityName & ADDname
END IF
InformativeMessage=InformativeMessage & "
========== Select applicable payment conditions:"&_
" SQL="&sqlCOND
Set RS_Conditions = DBConn.Execute(sqlCOND)
IF NOT RS_Conditions.EOF THEN ' NOT eof
RS_ConditionsEOF=FALSE
SESSION("NOpaymentConditions")=FALSE
SESSION("SubmitACCEPT")=FALSE
SESSION("PaymentModeSelected")="Not yet Defined"
ELSE
InformativeMessage=InformativeMessage &" ----- EOF, NO conditions!"
SESSION("NOpaymentConditions")=TRUE
SESSION("SubmitACCEPT")=TRUE
SESSION("PaymentModeSelected")="?"
RS_ConditionsEOF=TRUE
END IF
'END IF ' on LEFT(SESSION("OFFERorRESA"),2) = "OF"
'============================================ I A C C E P T CreditCard C H E C K CREDIT CARD
'PSR.109 suppress check values for CC card
'===================================================== E N D C H E C K
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ E N D F I R S T T I M E
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
'///////////////////////////////////////////////////////////////////////////////////////////////////
'//////////////////////////////////////////////////////////////////// E N D A S P APPLICATION
'///////////////////////////////////////////////////////////////////////////////////////////////////
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ H T M L S T A R T
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%>
|
|
<%'///////////////////////////////////////////////////////////////////////////////////////////////////%>
<%'///////////////////////////////////////////////////////////////////////// H T M L APPLICATION %>
<%'///////////////////////////////////////////////////////////////////////////////////////////////////%>
<%'##############################################################################################
'########################################################################## MULTIPLE RESA ???? ##
'################################################################################################%>
<% IF FirstTime = TRUE THEN ' question on multiple RESA%>
| |
| |
Would like you to set up an additional reservation? |
NO
|
| |
| |
If YES, please select an option: |
Accommodation
|
| |
Tour
|
| |
<% ELSE %>
<%'##############################################################################################
'########################################################### Display PRICING from Booking File ##
'################################################################################################%>
<% IF SESSION("NewRESAID") > 0 THEN %>
<%'---------------------------------------------------------------------------- ZERO Tables
DWEM_RESApricingOption = "DWEM_ZeroResaPricing" %>
<%'------------------------------------------------- Restaure Booking file >>> Table RESA
DWEModbcCall = "GetResaPricingFromDB"
ODBC_BookingID = SESSION("BookingFileID") %>
<%'----------------------------------------------------------------- Display RESA PRICING %>
| PRICING |
|
<% DWEM_RESApricingOption = "DWEM_DisplayResaPricing"
DWEM_DisplayPricing = TRUE%>
|
| |
<% END IF %>
<%'######################################################################### PAYMENT CONDITIONS %>
<% 'IF SESSION("SubmitACCEPT") <> TRUE THEN %>
<% IF RS_ConditionsEOF = TRUE THEN
SESSION("SubmitACCEPT") = TRUE
IF SESSION("PaymentModeSelected") <> "OFFER" THEN %>
|
NO SPECIFIC PAYMENT CONDITIONS
with
<%= SESSION("CustomerPaysTO_TEXT")%>
|
| |
<% END IF
ELSE %>
<%'================================================= ADVANCED PAYMENT %>
|
Advanced Payments Conditions |
Number of Days before stay |
Percent of total amount to be paid |
| <%= RS_Conditions("PaymentDays1") %> days |
<%= RS_Conditions("PaymentPercent1") %> |
| <%= RS_Conditions("PaymentDays2") %> days |
<%= RS_Conditions("PaymentPercent2") %> % |
| <%= RS_Conditions("PaymentDays3") %> days |
<%= RS_Conditions("PaymentPercent3") %> % |
|
<%'================================================= CANCEL PAYMENT %>
|
<% 'END IF ' on SESSION("SubmitACCEPT") <> TRUE%>
<% END IF ' on RS_ConditionsEOF <> TRUE%>
<%'=================================================================== %>
<% IF SESSION("PaymentModeSelected") <> "" OR MSGerror <> "" THEN
'##########################################################################################
'########################################################################## PAYMENT REQUEST %>
<%'########################################################################## CREDIT CARD display
'PSR.109 suppress check values for CC card
IF merdum = "merdum" Then '
'IF SESSION("SubmitACCEPT") <> TRUE THEN %>
<% IF LEFT(SESSION("PaymentModeSelected"),2) = "CC" THEN 'AND SESSION("SubmitACCEPT") <> TRUE THEN %>
| start CC.11111111111111111 |
<%'==================================================== CONFIRMATION %>
<%'========================================== CC ERRORmsg display
Dummy=ErrorMSGdisplay (MSGerrCCvalidation)
'========================================== Input ERRORmsg display
Dummy=ErrorMSGdisplay (MSGerror)
'========================================== INPUT Block%>
|
Please type in your credit card details
|
|
|
|
<%'============================================================ I ACCEPT creditcard
'========================================================== and PRICING%>
<% END IF ' on SESSION("PaymentModeSelected") = "CC" %>
<% 'END IF ' on SESSION("SubmitACCEPT") <> TRUE
'PSR.109 suppress check values for CC card
end IF ' on merdum = "merdum" Then , suppress CC card display form boxes'%>
<%'##########################################################################################
'########################################################################## PAYMENT REQUEST %>
<%'###################################################################### E N D CREDIT CARD %>
<%'##########################################################################################
'########################################################################## C O N F I R M %>
<%'############################################################## and General Conditions %>
<%'##########################################################################################%>
<% 'IF SESSION("SubmitACCEPT") = TRUE OR REQUEST("FinishPayment") = "CONFIRM" THEN%>
<%'-------------------------------------------------------------- NO PAYMENT conditions >> Message%>
<% IF RS_ConditionsEOF = TRUE THEN %>
NO payment conditions for
<%= SESSION("CustomerPaysTO_TEXT")%>.
Please contact this reseller to settle payment |
<% '--------- Info button for the PAYD TO entity
ModeGetInfo = "ExtID"
EntityExtID = SESSION("CustomerPaysTO_ExtID")
%><%
Name=EntityName & " , " & EntityCityName
LinkValuePopup= "../Globals/Includes/PopupTableTA.asp?"&_
"MS_TableName=" &EntityTable &_
"&MS_LINKmainIDField=" & ENTITYidFIELD &_
"&MS_LINKmainID=" & EntityID %>
|
<% END IF
'------------------------------------------------------------------ DISPLAY %>
<% 'END IF ' on SESSION("SubmitACCEPT") <> TRUE %>
<%'##########################################################################################
'########################################################################## PAYMENT REQUEST %>
<%'###################################################################### E N D Other MODES %>
<%'##########################################################################################
'#################################################################### END PAYMENT REQUEST %>
<% END IF ' on SESSION("PaymentModeSelected") <> "" %>
<%'==================================================END Application Body %>
<% END IF ' on FirstTime , question on multiple RESA %>
<%'///////////////////////////////////////////////////////////////////////////////////////////////////%>
|
<%'//////////////////////////////////////////////////////////////// E N D H T M L APPLICATION %>
<%'///////////////////////////////////////////////////////////////////////////////////////////////////%>
<%'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%>
<%'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ E N D H T M L %>
<%'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%>
<%'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%>