|
Multiple Reservations with one Credit Card Charge |
Top Previous Next |
|
The AL-Pro Web Portal supports up to 9 reservations processed and charged with one charge on a credit card.
In order to support multiple payments, reservations created must use the concept of :masterreservation.
This means that when you create reservations using als_insert_reservation.cgi your first reservation created becomes the master reservation. The value returned from the call to als_insert_reservation.cgi is then used as the masterreseration param for subsequent als_insert_reservation.cgi calls.
Example:
1. reservation gets created: als_insert_reservation.cgi?date=2007-10-15&lastname=Lohan&firstname=Lindsey . This reservation creates Rese # 276977. 2. next reservation:als_insert_reservation.cgi?date=2007-10-15&lastname=Lohan&firstname=Lindsey&mastereservation=276977
Now with up to 9 reservations with one defined as the master, you are ready to create one credit card payment for all of the reservations.
rescount= The Number of reservations passed in
Existing Params: reservation- still required and should be the master reservation amount-still required and is the total amount to be charged
New Params support up to 9 reservations rescount- The total of number reservations amount1..amount9 res1..res9
1. If Rescount>0 then a check is done to insure that all the amount1,amount2.. add up to the amount 2. a check is done to insure each reservation is valid and a subreservation of the master.
Reservation # 276977 with a total of 44.48 Reservation #276978 with a total of 102.24 Grand Total is : 146.82 ResCount is 2.
als_process_credit_card.cgi?ccexp=0710&ccnumber=12324&reservation=276977&amount=146.82&cccid=123&cctestonly=true&rescount=2&amount1=44.48&amount2=102.34&res1=277977&res2=276978&ccTestApproval=true
is XML file does not appear to have any style information associated with it. The document tree is shown below.
− <root> − <creditcardauthorization> <row user="79" desk="1" merchantcode="0" reservation="276977" amount="146.82" credit="False" ccno="X2324" ccexp="0710" nameoncard="ALLGOOD, DUSTIN" cardpresent="False" verifycardonly="False" controlno="0" responsecode="00" responsetext="TestOK" approvalcode="123456" postedreference="" manualauthorization="False" manualapprovalcode="" cardswiped="False" trackno="0" trackstring="" authorizeonly="False" verifycredittrans="False" origtrackread="" usecid="False" cid="123" needavs="True" streetaddress="8351 TIMBER BASIN" zipcode="78250"/> </creditcardauthorization> − <payments> <row paycode="243816" reservation="276978" base="1" amount="102.34" paytype="2" referencevalue="Internet Split Master=276977" datevalue="12/09/2009" timevalue="13:06" voucheramount="" username="Internet" basename="Maui" paytypename="Credit Card"/> <row paycode="243815" reservation="276977" base="1" amount="44.48" paytype="2" referencevalue="Internet Split Master=276977" datevalue="12/09/2009" timevalue="13:06" voucheramount="" username="Internet" basename="Maui" paytypename="Credit Card"/> </payments> </root> |