VoidType Property
Identifies the type of void to execute.
Syntax
fdmsgiftcard.getVoidType([callback]) fdmsgiftcard.setVoidType( voidType, [callback])
Possible Values
0 (vtRedemption), 1 (vtLoad), 2 (vtActivation)
Default Value
0
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 the getVoidType([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setVoidType([callback]) 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
This property is used by the VoidTransaction method to indicate the type of transaction which is to be voided. Valid void types include:
vtRedemption (0) | This is used to void a purchase performed on a gift card using the RedeemCard method. It works to void regular redemptions, partial redemptions, and cashouts. A call to VoidTransaction will add the TransactionAmount back to the gift card balance. When voiding a partial redemption or cash out, the TransactionAmount must equal the actual value that was approved in the redemption, not the amount requested. |
vtLoad (1) | This voids a load, reload, refund or adjustment that was made with the LoadCard method. The TransactionAmount is removed from the current balance of the gift card account. |
vtActivation (2) | This voids the activation of the gift card made with ActivateCard, and changes the card's status back to inactive. If a financial transaction has been completed on the gift card (for instance, a redemption or load), the activation cannot be voided unless all transactions since the activation are also voided. |
Data Type
Integer