Esempio n. 1
0
 /**
  * @return array
  */
 public function toArray()
 {
     $refund = array_filter(get_object_vars($this));
     if ($this->payment instanceof Payment) {
         unset($refund['payment']);
         $refund['links']['payment'] = $this->payment->getId();
     }
     return $refund;
 }
Esempio n. 2
0
 /** @depends test_it_can_create_a_payment */
 function test_it_can_get_a_single_payment(Payment $old)
 {
     $new = $this->api->getPayment($old->getId());
     $this->assertEquals($old->toArray(), $new->toArray());
     return $new;
 }