Ejemplo n.º 1
0
 /** @test */
 function it_has_shortcut_methods()
 {
     $refund = new Refund();
     $payment = Payment::fromArray(['id' => 'PM123']);
     $refund->of($payment)->returning(100)->totalling(150);
     $this->assertSame(100, $refund->getAmount());
     $this->assertSame(150, $refund->getTotalAmountConfirmation());
     $this->assertAttributeSame($payment, 'payment', $refund);
 }
Ejemplo n.º 2
0
 /**
  * @see https://developer.gocardless.com/pro/#refunds-get-a-single-refund
  *
  * @param $id
  *
  * @return Refund
  */
 public function getRefund($id)
 {
     $response = $this->get(self::REFUNDS, [], $id);
     return Refund::fromArray($response);
 }