/** * The invalid HPS config test method. * * @expectedException HpsGatewayException * @expectedExceptionCode HpsExceptionCodes::INVALID_NUMBER * @expectedExceptionMessage The card number is not valid */ public function testChargeWhenCardNumberIsInvalidShouldThrowHpsException() { $testConfig = new TestServicesConfig(); $ChargeAmount = 50; $Currency = "usd"; $chargeSvc = new HpsCreditService($testConfig->ValidMultiUseConfig()); $chargeSvc->Charge($ChargeAmount, $Currency, TestCreditCard::invalidCreditCard(), TestCardHolder::validCardHolder()); }