|
als_insert_voucher_payment.cgi |
Top Previous Next |
|
Description The als_insert_voucher_payment.cgi interface inserts a payment in the AL-Desk payments table for one or more vouchers. Vouchers consists of product rates for a single product and are added using als_insert_voucher.cgi.
For advanced shopping cart features a user may purchase multiple products from one or more vendors and you would want to be able to process one payment that would be applied to multiple vouchers. The als_insert_voucher_payment.cgi method provides this functionality allowing for one payment to be applied to multiple vouchers for one client.
Note:If you have licensed the AL-Desk Credit Card Processing server, then then credit card authorization can be done within this call also with additional credit card parameters.
The vouchers are first created using the als_insert_voucher.cgi method along with the custompayment parameter. This parameter instructs als_insert_voucher.cgi to not auto post a payment and the voucher will not be tagged as issued. Thus multiple vouchers are created and their resulting voucher codes are used in the als_insert_voucher_payment.cgi call.
Note: The als_get_vouchers.cgi call has an issued:Boolean switch to view vouchers issued or not issued for any given client.
Description of Required Inputs A webusercode:Integer must be included that represents the Web Interface user code supplied to you by your Activity Link System Administrator. A client:Integer must be included that represents the client code:integer from the clients table. An amount:float must be submitted that represents the total of the vouchers submitted. If the amount does not match the total of the vouchers, an error will be returned like the one below error> <row> <row error="amount 2182.52 does not match voucher total 1182.52" errorcode="0"/> </row> </error>
The vouchers submitted must use the format of voucher1,voucher2,voucherXX up to 8 vouchers supported on this call.
Trying to Post a payment to a voucher that already has a payment applied to it If you attempt to post a payment to a voucher that already has a payment applied to it you will get an error.
<error> <row> <row error="Voucher:9 for Client:103046 already has a payment posted control number:5194" errorcode="0"/> </row> </error>
Returned Values The XML returned will include the ControlNo as the als_insert_payment.cgi returns also. Your AL-Desk accounting staff can use this control number as required and this number maybe offered to the client as a confirmation/receipt of payment.
Example Usage
Inputs- This call also supports the integration of the als_process_credit_card.cgi when used via a secure channel to provide for credit card authorization and payment posting all in one call. In this case additional parameters are used for credit card authorization processing.
XML Example <root> <payments> <row seq="2222" controlno="5193" datevalue="1/11/2006" timevalue="10:25:17 AM" paytype="21" amount="1182.52" issuedby="1" referencevalue="" issueddesk="4" client="103046"/> </payments> </root>
|