Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function populateConfig(ArrayObject $config)
 {
     $config->defaults(['payum.factory_name' => 'stripe_direct', 'payum.factory_title' => 'Stripe Direct', 'payum.action.obtain_token' => new ObtainTokenForCreditCardAction()]);
     parent::populateConfig($config);
 }
 /**
  * @test
  *
  * @expectedException \Payum\Core\Exception\LogicException
  * @expectedExceptionMessage The publishable_key, secret_key fields are required.
  */
 public function shouldThrowIfRequiredOptionsNotPassed()
 {
     $factory = new StripeCheckoutGatewayFactory();
     $factory->create();
 }
Ejemplo n.º 3
0
 /**
  * {@inheritDoc}
  */
 protected function populateConfig(ArrayObject $config)
 {
     $config->defaults(array('payum.factory_name' => 'stripe_js', 'payum.factory_title' => 'Stripe.Js', 'payum.template.obtain_token' => '@PayumStripe/Action/obtain_js_token.html.twig'));
     parent::populateConfig($config);
 }
 /**
  * @test
  */
 public function shouldConfigurePaths()
 {
     $factory = new StripeCheckoutGatewayFactory();
     $config = $factory->createConfig();
     $this->assertInternalType('array', $config);
     $this->assertNotEmpty($config);
     $this->assertInternalType('array', $config['payum.paths']);
     $this->assertNotEmpty($config['payum.paths']);
     $this->assertArrayHasKey('PayumCore', $config['payum.paths']);
     $this->assertStringEndsWith('Resources/views', $config['payum.paths']['PayumCore']);
     $this->assertTrue(file_exists($config['payum.paths']['PayumCore']));
     $this->assertArrayHasKey('PayumStripe', $config['payum.paths']);
     $this->assertStringEndsWith('Resources/views', $config['payum.paths']['PayumStripe']);
     $this->assertTrue(file_exists($config['payum.paths']['PayumStripe']));
 }