/** * @test * Visa auth and CPC Req should return cpcIndicator 'S'. */ public function testVisaAuthCPCReqShouldReturnPurchasing() { $testConfig = new TestServicesConfig(); $chargeSvc = new HpsCreditService($testConfig->validMultiUseConfig()); $response = $chargeSvc->authorize(134.56, "usd", TestCreditCard::validVisaCreditCard(), TestCardHolder::ValidCardHolder(), false, null, null, false, true); $this->assertEquals("00", $response->responseCode); $this->assertEquals("S", $response->cpcIndicator); $cpcData = new HpsCPCData(); $cpcData->CardHolderPONbr = "123456789"; $cpcData->TaxType = HpsTaxType::SALES_TAX; $cpcData->TaxAmt = '15'; $response2 = $chargeSvc->cpcEdit($response->transactionId, $cpcData); $this->assertEquals("00", $response2->responseCode); }
/** * Creates a cpcEdit transaction through the HpsCreditService */ public function execute() { parent::execute(); $cpcEditSvc = new HpsCreditService($this->service->servicesConfig()); return $cpcEditSvc->cpcEdit($this->transactionId, $this->cpcData); }