RedeemCard Method
Deducts funds from a gift card for the purchase of goods or services.
Syntax
ptechgiftcard.redeemCard([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
A Redemption transaction is the process of deducting value from the Gift Card, and is very similar to a Credit Card Sale transaction, except that funds are immediately removed from the balance of the gift card. RedeemCard requests that the host verify and remove funds from the cardholder's Stored Value (Gift) Card. This transaction is automatically added to the current open batch, and will be settled when the PTechHostSettle class's BatchRelease method is called.
The gift card may be specified by either a CardMagneticStripe returned by a card reader, (Track2 only), or manually entered through the CardNumber, CardExpMonth, and CardExpYear.A 3-digit Card Verification Value code may also be supplied in the CardCVVData property.
The ResponseCode and ResponseText properties indicate whether this transaction was successful. The host will return either an approval if the card has the requested value, or a decline if the card has less than the requested value.
If the merchant allows it, at the time of purchase a customer my Cash Out his gift card, and receive the remainder of the gift card's stored value as cash. To cash out a gift card, set the CashOutIndicator to True before calling RedeemCard. The change to be returned to the customer (The gift card's total value minus the TransactionAmount) will be returned in ResponseCashOut, and the ResponseBalance will be "0.00".
In the case that the customer's gift card does not have enough funds to cover the entire TransactionAmount, the merchant may request that the host perform a Partial Redemption. With PartialRedemption set to True, the Point of Sale is capable of processing a Redemption transaction for more than the card balance and still receive an approval. All of the funds remaining on the gift card will be put towards the TransactionAmount, and the merchant will be required to obtain an additional form of payment for the remaining balance. The amount actually removed from the card will be returned in ResponseAuthorizedAmount, and the customer's receipt should indicate the remaining amount (TransactionAmount - ResponseAuthorizedAmount) due.