Showing results for 
Search instead for 
Did you mean: 

Gift Card getting charged inspite of points payment

Gift Card getting charged inspite of points payment

When payment is done by redeeming points in conjunction with a gift card, the gift card gets charged the whole value of the grand total inspite of redeeming points.  I have added gift card to the quote programmatically like so: 

private function _setGiftCard(&$quote)

        try {
            $cards = unserialize($quote->getGiftCards());
            foreach ($cards as $card) {
                $currentCard = Mage::getModel('enterprise_giftcardaccount/giftcardaccount')->load($card['i']);
                if ($currentCard->getId()) {
                    $currentCard->removeFromCart(true, $quote);

            $giftCard = Mage::getModel('enterprise_giftcardaccount/giftcardaccount')->loadByCode($this->_giftCard);
	    $cid = $this->_getRead()->fetchOne('SELECT customer_id FROM do_customer_giftcard WHERE giftcard_id='.$giftCard->getId());
	    if($cid!=$this->_customerId) throw new Exception('no ownership');
            $giftCard->addToCart(true, $quote);
        } catch (Exception $e) {
            throw new Goopter_Gift_Card_Exception($e->getMessage());

And Points Value calculated if added to quote using set methods. Seems like gift card payment does not recognize the payment by points. Any help would be much appreciated. Thanks!

Screen Shot 2019-12-16 at 12.09.48 PM.png