コード例 #1
0
 function it_maps_authorization_information(Payment $payment)
 {
     $data = ['authorization_information' => ['url' => 'https://authorization.url/auth', 'data' => 'eJxdUl1vwj.......']];
     $info = new AuthorizationInformation();
     $info->setUrl('https://authorization.url/auth');
     $info->setData('eJxdUl1vwj.......');
     $payment->setAuthorizationInformation($info)->shouldBeCalled();
     $this->map($data, $payment);
 }
コード例 #2
0
 public function testBeginAuthorization()
 {
     $session = $this->client->getContainer()->get('session');
     $payment = new Payment();
     $payment->setId('payment_id');
     $auth = new AuthorizationInformation();
     $auth->setUrl('http://...');
     $auth->setData('auth_data');
     $payment->setAuthorizationInformation($auth);
     $session->set('cardinity_payment', $payment->serialize());
     $crawler = $this->client->request('GET', '/cardinity/authorization/begin');
     $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
 }