/** * Deletes both from card info and from cards * * @param $cardID string */ public function deleteCard($cardID) { $card_info_repo = new CardInfoRepository(); $payment_repo = new PaymentRepository(); $card_info_repo->removeByID($cardID); $payment_repo->removeCardID($cardID); $this->removeByID($cardID); }
public function testChangeExpiry() { $repo = new CardInfoRepository(); $month = '01'; $year = '20'; $card_info = $repo->retrieveByID(self::$temp_id); $response = $this->mw()->changeExpiry(['cardID' => $card_info->cardID, 'cardExpiryMonth' => $month, 'cardExpiryYear' => $year]); $this->assertTrue($response->success()); $card_info = $repo->retrieveByID(self::$temp_id); $this->assertEquals($card_info->cardExpiryMonth, $month); $this->assertEquals($card_info->cardExpiryYear, $year); }