Method: dgCharge::Settle()
Settle(transaction_list)
The
Settle method settles all transactions in the current open batch or,
if the transaction_list argument is supplied, only those transactions specified
in the transaction_list.
A current
merchant must be set before calling this method (see
SetMerchant). This method
is applicable only if the current merchant is one that has been set to perform
manual settlement. Please see the
AddMerchant
method for more information.
There is one optional argument.
Transaction_list
A string consisting of a comma-separated list of record numbers of transactions
to settle. If this argument is supplied but contains inapplicable record numbers,
none of the transactions will be settled.
If this argument is not supplied, all unsettled transactions will be settled.
Return Value
A value of
True is returned if successful; otherwise
a value of
False is returned. If successful, the
ErrorText
property has the value "no error"; otherwise this property
contains a description of the error. In addition, all information
concerning successful transaction settlements is entered into
the
dgCharge Professional Edition transaction database.
Code:
<%
' create an instance of the object
Set oChargeObject = Server.CreateObject("dgCharge.Charge")
' establish the merchant
bSetOK = oChargeObject.SetMerchant ("999999999","999999")
' settle the open batch
If bSetOK Then
If Not oChargeObject.Settle Then
Response.Write (oChargeObject.ErrorText)
End If
End If
%>