ReversePartialAuth Method
This performs a reversal of a partially-authorized transaction.
Syntax
fdmshealthcare.reversePartialAuth(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 an FSA card is authorized for an amount less than the TransactionAmount, the customer must use another form of payment for the remainder. If the customer does not have any other funds, the transaction that was just authorized may be reversed and the funds returned to the FSA card. To reverse a transaction, you need to set the TransactionAmount property with the ResponseAuthorizedAmount from the partially-authorized transaction, and then pass the ResponseTransactionId, ResponseValidationCode, and ResponseApprovalCode to this method. The following example shows how to reverse immediately after receiving a partial authorization.
FDMSHealthCare1.TransactionNumber = FDMSHealthCare1.TransactionNumber + 1 FDMSHealthCare1.TransactionAmount = FDMSHealthCare1.ResponseAuthorizedAmount FDMSHealthCare1.ReversePartialAuth(FDMSHealthCare1.ResponseTransactionId, FDMSHealthCare1.ResponseValidationCode, FDMSHealthCare1.ResponseApprovalCode)
A transaction that has been reversed in this manner 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.