/** * @return Job */ protected function buildData() { $transaction = $this->buildTransaction(); $reversal = new Reversal($transaction); return Job::createReversalJob($this->getSignature(), $reversal); }
/** * @depends testPurchaseRequest * @large * @param string $guWid * @return string */ public function testReversalRequest($guWid) { $transaction = new Transaction(); $transaction->id = '9457892347623478'; $transaction->guWid = $guWid; $reversal = new Reversal($transaction); $job = Job::createReversalJob(self::SIGNATURE, $reversal); $request = new Request($job); $body = $this->serializer->serialize(WireCard::createWithRequest($request), 'xml'); $response = $this->client->send($this->createRequest($body)); /** @var WireCard $wireCard */ $wireCard = $this->serializer->deserialize($response->getBody(true), 'Wirecard\\Element\\WireCard', 'xml'); $response = $wireCard->response; $this->assertTrue($response->isSuccessful()); $this->assertNull($response->getMessage()); }