ReverseFullAuth Method
This performs a reversal of a fully-authorized transaction.
Syntax
fdmshealthcare.reverseFullAuth(transactionId, validationCode, approvalCode, [callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
If you wish to reverse a transaction that was authorized for an amount less than the TransactionAmount, you must use the ReversePartialAuth method. The ReverseFullAuth method can only be used to reverse fully authorized transactions. This means that the ResponseAuthorizedAmount property from the original transaction Response was empty. You do not have to reverse the full TransactionAmount from the original transaction, you may reverse only part of that TransactionAmount if you so desire.
To reverse a transaction, simply set the TransactionAmount property to a value equal to or less than the original TransactionAmount, and call the ReverseFullAuth method with the ResponseTransactionId, ResponseValidationCode, and ResponseApprovalCode properties from the original transaction Response. For instance:
FDMSHealthCare1.TransactionAmount = "20000" ' $200.00 FDMSHealthCare1.Authorize() FDMSHealthCare1.TransactionNumber = FDMSHealthCare1.TransactionNumber + 1 FDMSHealthCare1.TransactionAmount = "20000" FDMSHealthCare1.ReverseFullAuth(FDMSHealthCare1.ResponseTransactionId, FDMSHealthCare1.ResponseValidationCode, FDMSHealthCare1.ResponseApprovalCode)
If you reverse a transaction for less than original TransactionAmount, you must update the Detail Record for the associated transaction to reflect the new settlement amount. If you reverse the entire amount the original transaction MUST NOT be sent in the settlement.
Please note that the ReversePartialAuth method is only applicable to healthcare (FSA card) transactions, and may not be used for regular credit card transactions.