public function testACHDebitCorporate8SavingsBusiness() { $check = TestCheck::certification(); $check->accountType = 'savings'; $check->checkType = 'business'; $check->secCode = 'ccd'; $checkService = new HpsCheckService(TestServicesConfig::CertServicesConfigWithDescriptor()); $response = $checkService->sale('SALE', $check, 18.0); $this->assertNotNull($response, 'Response is null'); $this->assertEquals('0', $response->responseCode); $this->assertEquals('Transaction Approved', $response->responseText); }
/** * @expectedException HpsArgumentException * @expectedExceptionMessage Sale needs an amount */ public function testNoAmount() { $this->service->sale()->withCheck(TestCheck::certification())->execute(); }
public function testEBronzeVerify40SavingsBusiness() { $check = TestCheck::certification(); $check->secCode = HpsSECCode::EBRONZE; $check->checkType = HpsCheckType::BUSINESS; $check->accountType = HpsAccountType::SAVINGS; $checkService = new HpsCheckService(TestServicesConfig::ValidMultiUseConfig()); $response = $checkService->sale($check, 1); $this->assertNotNull($response, 'Response is null'); $this->assertEquals('0', $response->responseCode); $this->assertEquals('Transaction Approved', $response->responseText); }