/** * @depends testListPayments * @param Payment $old */ public function testGetPayment($old) { $new = $this->getClient()->getPayment($old->getId()); $newArray = $new->toArray(); $oldArray = $old->toArray(); $this->assertEquals($newArray, $oldArray); }
/** * @param Payment $payment * @return Payment * @throws \Exception */ public function cancelPayment(Payment $payment) { $response = $this->post(self::ENDPOINT_PAYMENTS, [], $payment->getId() . self::CANCEL_ACTION); $payment->fromArray($response); return $payment; }