Example #1
0
 public function it_should_create_a_new_preauth()
 {
     $this->beConstructedWith($this->concoctRequest('card_payments/create.json'));
     $modelBuilder = new \Judopay\Test\CardPaymentBuilder();
     $this->setAttributeValues($modelBuilder->getAttributeValues());
     $output = $this->create();
     $output->shouldBeArray();
     $output['result']->shouldEqual('Success');
 }
Example #2
0
 public function it_should_use_the_configured_judo_id_if_one_is_not_provided()
 {
     $this->beConstructedWith($this->concoctRequest('card_payments/create.json'));
     $modelBuilder = new \Judopay\Test\CardPaymentBuilder();
     // Set an empty Judo ID to make sure the config value is used
     $modelBuilder->setJudoId(null);
     $this->setAttributeValues($modelBuilder->getAttributeValues());
     $output = $this->create();
     $this->getAttributeValue('judoId')->shouldEqual('123-456');
 }