Exemple #1
0
 private function guardAgainstInvalidPaymentToRefund()
 {
     $config = (require __DIR__ . '/../config.php');
     if (!isset($config['paymentToRefund']) or $config['paymentToRefund'] == '') {
         $this->markTestSkipped('Skipping test due to [paymentToRefund] was not set in the config');
     }
     $payment = $this->api->getPayment($config['paymentToRefund']);
     if (!$payment->isConfirmed() or !$payment->isPaidOut()) {
         $this->markTestSkipped('Skipping test due to payment status is not confirmed or paid_out');
     }
 }
Exemple #2
0
 /** @group Exceptions */
 function test_it_throws_an_exception_if_a_payment_is_not_found()
 {
     $this->setExpectedException('GoCardless\\Pro\\Exceptions\\ResourceNotFoundException', 'Resource not found at /payments/1234', 404);
     $this->api->getPayment('1234');
 }