Example #1
0
 /**
  * Get possible iDEAL issuers.
  *
  * @return Issuers
  */
 public function getIdealIssuers()
 {
     try {
         return Issuers::fromArray($this->httpClient->get('ideal/issuers/')->json());
     } catch (RequestException $exception) {
         throw new ClientException('An error occurred while processing the request: ' . $exception->getMessage(), $exception->getCode(), $exception);
     }
 }
Example #2
0
 /**
  * @test
  */
 public function itShouldBeTraversable()
 {
     $array = [['id' => 'ABNANL2A', 'name' => 'ABN AMRO Bank', 'list_type' => 'Nederland'], ['id' => 'INGBNL2A', 'name' => 'ING Bank', 'list_type' => 'Nederland']];
     $issuers = Issuers::fromArray($array);
     $iterations = 0;
     foreach ($issuers as $key => $issuer) {
         $this->assertEquals($iterations, $key);
         $this->assertInstanceOf('GingerPayments\\Payment\\Ideal\\Issuer', $issuer);
         $iterations++;
     }
     $this->assertEquals(2, $iterations);
 }