public function testVisaDebitWhenValidTrackDataShouldReverseOk() { $service = new HpsDebitService(TestServicesConfig::validMultiUseConfig()); $charge = $service->charge(50, "usd", "%B4012002000060016^VI TEST CREDIT^251210118039000000000396?;4012002000060016=25121011803939600000?", "32539F50C245A6A93D123412324000AA", null, true); $this->assertNotNull($charge); $this->assertEquals("00", $charge->responseCode); $reverse = $service->reverse($charge->transactionId, 50, "%B4012002000060016^VI TEST CREDIT^251210118039000000000396?;4012002000060016=25121011803939600000?"); $this->assertNotNull($reverse); $this->assertEquals("00", $reverse->responseCode); }
public function testMastercardDebitWhenValidTrackDataShouldReverseOk() { $service = new HpsDebitService(TestServicesConfig::validMultiUseConfig()); $charge = $service->charge(50, "usd", "%B5473500000000014^MC TEST CARD^251210199998888777766665555444433332?;5473500000000014=25121019999888877776?", "F505AD81659AA42A3D123412324000AB", null, true); $this->assertNotNull($charge); $this->assertEquals("00", $charge->responseCode); $reverse = $service->reverse($charge->transactionId, 50, "%B5473500000000014^MC TEST CARD^251210199998888777766665555444433332?;5473500000000014=25121019999888877776?"); $this->assertNotNull($reverse); $this->assertEquals("00", $reverse->responseCode); }
/** * Creates a charge transaction through the HpsDebitService */ public function execute() { parent::execute(); $chargeSvc = new HpsDebitService($this->service->servicesConfig()); return $chargeSvc->charge($this->amount, $this->currency, $this->trackData, $this->pinBlock, $this->encryptionData, $this->allowDuplicates, $this->cashBackAmount, $this->allowPartialAuth, $this->cardHolder, $this->details, $this->clientTransactionId); }