diff --git a/phpspec.yml b/phpspec.yml
index 04fdb81096..6b727f9b69 100644
--- a/phpspec.yml
+++ b/phpspec.yml
@@ -7,7 +7,7 @@ suites:
MoneyBundle : { namespace: Sylius, spec_path: src/Sylius/Bundle/MoneyBundle }
OmnipayBundle : { namespace: Sylius, spec_path: src/Sylius/Bundle/OmnipayBundle }
OrderBundle : { namespace: Sylius, spec_path: src/Sylius/Bundle/OrderBundle }
- PaymentsBundle : { namespace: Sylius, spec_path: src/Sylius/Bundle/PaymentsBundle }
+ PaymentBundle : { namespace: Sylius, spec_path: src/Sylius/Bundle/PaymentBundle }
PayumBundle : { namespace: Sylius, spec_path: src/Sylius/Bundle/PayumBundle }
ProductBundle : { namespace: Sylius, spec_path: src/Sylius/Bundle/ProductBundle }
PromotionBundle : { namespace: Sylius, spec_path: src/Sylius/Bundle/PromotionBundle }
diff --git a/src/Sylius/Bundle/CoreBundle/Checkout/Step/PurchaseStep.php b/src/Sylius/Bundle/CoreBundle/Checkout/Step/PurchaseStep.php
index 858a7bc954..68582b1789 100644
--- a/src/Sylius/Bundle/CoreBundle/Checkout/Step/PurchaseStep.php
+++ b/src/Sylius/Bundle/CoreBundle/Checkout/Step/PurchaseStep.php
@@ -14,11 +14,11 @@ namespace Sylius\Bundle\CoreBundle\Checkout\Step;
use Payum\Bundle\PayumBundle\Security\TokenFactory;
use Payum\Core\Registry\RegistryInterface;
use Payum\Core\Security\HttpRequestVerifierInterface;
-use Sylius\Bundle\CoreBundle\Model\OrderInterface;
-use Sylius\Bundle\FlowBundle\Process\Context\ProcessContextInterface;
-use Sylius\Bundle\PaymentsBundle\SyliusPaymentEvents;
use Sylius\Bundle\CoreBundle\Checkout\SyliusCheckoutEvents;
use Sylius\Bundle\CoreBundle\Event\PurchaseCompleteEvent;
+use Sylius\Bundle\CoreBundle\Model\OrderInterface;
+use Sylius\Bundle\FlowBundle\Process\Context\ProcessContextInterface;
+use Sylius\Bundle\PaymentBundle\SyliusPaymentEvents;
use Sylius\Bundle\PayumBundle\Payum\Request\StatusRequest;
use Symfony\Component\EventDispatcher\GenericEvent;
use Symfony\Component\HttpFoundation\RedirectResponse;
diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListener.php
index 64645919cc..696a6d22dd 100644
--- a/src/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListener.php
+++ b/src/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListener.php
@@ -14,8 +14,8 @@ namespace Sylius\Bundle\CoreBundle\EventListener;
use Sylius\Bundle\CoreBundle\Model\OrderInterface;
use Sylius\Bundle\CoreBundle\OrderProcessing\PaymentProcessorInterface;
use Sylius\Bundle\CoreBundle\SyliusOrderEvents;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
+use Sylius\Component\Payment\Model\PaymentInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
@@ -115,7 +115,7 @@ class OrderPaymentListener
if (!$payment instanceof PaymentInterface) {
throw new \InvalidArgumentException(sprintf(
- 'Order payment listener requires event subject to be instance of "Sylius\Bundle\PaymentsBundle\Model\PaymentInterface", %s given.',
+ 'Order payment listener requires event subject to be instance of "Sylius\Component\Payment\Model\PaymentInterface", %s given.',
is_object($payment) ? get_class($payment) : gettype($payment)
));
}
diff --git a/src/Sylius/Bundle/CoreBundle/EventListener/PurchaseListener.php b/src/Sylius/Bundle/CoreBundle/EventListener/PurchaseListener.php
index 77eff1102c..1540568282 100644
--- a/src/Sylius/Bundle/CoreBundle/EventListener/PurchaseListener.php
+++ b/src/Sylius/Bundle/CoreBundle/EventListener/PurchaseListener.php
@@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Sylius\Bundle\CartBundle\Provider\CartProviderInterface;
use Sylius\Bundle\CoreBundle\Event\PurchaseCompleteEvent;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
+use Sylius\Component\Payment\Model\PaymentInterface;
class PurchaseListener
{
diff --git a/src/Sylius/Bundle/CoreBundle/Model/Order.php b/src/Sylius/Bundle/CoreBundle/Model/Order.php
index 5153c3319e..fee91cceb5 100644
--- a/src/Sylius/Bundle/CoreBundle/Model/Order.php
+++ b/src/Sylius/Bundle/CoreBundle/Model/Order.php
@@ -15,10 +15,10 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Sylius\Component\Addressing\Model\AddressInterface;
use Sylius\Bundle\CartBundle\Model\Cart;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
use Sylius\Component\Promotion\Model\CouponInterface;
use Sylius\Component\Promotion\Model\PromotionInterface;
use Sylius\Bundle\OrderBundle\Model\AdjustmentInterface;
+use Sylius\Component\Payment\Model\PaymentInterface;
/**
* Order entity.
diff --git a/src/Sylius/Bundle/CoreBundle/Model/OrderInterface.php b/src/Sylius/Bundle/CoreBundle/Model/OrderInterface.php
index f4044eab0f..13d9d1cb20 100644
--- a/src/Sylius/Bundle/CoreBundle/Model/OrderInterface.php
+++ b/src/Sylius/Bundle/CoreBundle/Model/OrderInterface.php
@@ -17,7 +17,7 @@ use Sylius\Bundle\CartBundle\Model\CartInterface;
use Sylius\Bundle\OrderBundle\Model\AdjustmentInterface;
use Sylius\Component\Promotion\Model\CouponInterface;
use Sylius\Component\Promotion\Model\PromotionSubjectInterface;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
+use Sylius\Component\Payment\Model\PaymentInterface;
/**
* Sylius core Order model.
diff --git a/src/Sylius/Bundle/CoreBundle/Resources/config/app/payum.yml b/src/Sylius/Bundle/CoreBundle/Resources/config/app/payum.yml
index 1ebd0efa79..f34211c415 100644
--- a/src/Sylius/Bundle/CoreBundle/Resources/config/app/payum.yml
+++ b/src/Sylius/Bundle/CoreBundle/Resources/config/app/payum.yml
@@ -24,7 +24,7 @@ payum:
Sylius\Bundle\CoreBundle\Model\Order:
doctrine:
driver: orm
- Sylius\Bundle\PaymentsBundle\Model\Payment:
+ Sylius\Component\Payment\Model\Payment:
doctrine:
driver: orm
@@ -44,7 +44,7 @@ payum:
Sylius\Bundle\CoreBundle\Model\Order:
doctrine:
driver: orm
- Sylius\Bundle\PaymentsBundle\Model\Payment:
+ Sylius\Component\Payment\Model\Payment:
doctrine:
driver: orm
@@ -65,7 +65,7 @@ payum:
Sylius\Bundle\CoreBundle\Model\Order:
doctrine:
driver: orm
- Sylius\Bundle\PaymentsBundle\Model\Payment:
+ Sylius\Component\Payment\Model\Payment:
doctrine:
driver: orm
@@ -86,7 +86,7 @@ payum:
Sylius\Bundle\CoreBundle\Model\Order:
doctrine:
driver: orm
- Sylius\Bundle\PaymentsBundle\Model\Payment:
+ Sylius\Component\Payment\Model\Payment:
doctrine:
driver: orm
@@ -100,6 +100,6 @@ payum:
Sylius\Bundle\CoreBundle\Model\Order:
doctrine:
driver: orm
- Sylius\Bundle\PaymentsBundle\Model\Payment:
+ Sylius\Component\Payment\Model\Payment:
doctrine:
driver: orm
diff --git a/src/Sylius/Bundle/CoreBundle/Resources/config/app/sylius.yml b/src/Sylius/Bundle/CoreBundle/Resources/config/app/sylius.yml
index 60887912b2..49928e8518 100644
--- a/src/Sylius/Bundle/CoreBundle/Resources/config/app/sylius.yml
+++ b/src/Sylius/Bundle/CoreBundle/Resources/config/app/sylius.yml
@@ -77,7 +77,7 @@ sylius_inventory:
stockable:
model: %sylius.model.variant.class%
-sylius_payments:
+sylius_payment:
classes:
payment:
controller: Sylius\Bundle\CoreBundle\Controller\PaymentController
diff --git a/src/Sylius/Bundle/CoreBundle/Resources/config/doctrine/model/Order.orm.xml b/src/Sylius/Bundle/CoreBundle/Resources/config/doctrine/model/Order.orm.xml
index 204b2fe710..0fdc3daa1e 100644
--- a/src/Sylius/Bundle/CoreBundle/Resources/config/doctrine/model/Order.orm.xml
+++ b/src/Sylius/Bundle/CoreBundle/Resources/config/doctrine/model/Order.orm.xml
@@ -20,7 +20,7 @@
-
+
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/Checkout/Step/PurchaseStepSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/Checkout/Step/PurchaseStepSpec.php
index c73c83bfbf..bf3b4b052c 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/Checkout/Step/PurchaseStepSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/Checkout/Step/PurchaseStepSpec.php
@@ -22,9 +22,10 @@ use spec\Sylius\Bundle\CoreBundle\Fixture\RequestStack;
use Sylius\Bundle\CartBundle\Provider\CartProviderInterface;
use Sylius\Bundle\CoreBundle\Checkout\SyliusCheckoutEvents;
use Sylius\Bundle\CoreBundle\Model\Order;
+use Sylius\Bundle\CoreBundle\Checkout\SyliusCheckoutEvents;
use Sylius\Bundle\FlowBundle\Process\Context\ProcessContextInterface;
-use Sylius\Bundle\PaymentsBundle\Model\Payment;
-use Sylius\Bundle\PaymentsBundle\SyliusPaymentEvents;
+use Sylius\Bundle\PaymentBundle\SyliusPaymentEvents;
+use Sylius\Component\Payment\Model\Payment;
use Symfony\Bridge\Doctrine\RegistryInterface as DoctrinRegistryInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListenerSpec.php
index f7dd846999..f193b0abc9 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/EventListener/OrderPaymentListenerSpec.php
@@ -17,7 +17,7 @@ use Sylius\Bundle\CoreBundle\Model\OrderInterface;
use Sylius\Bundle\CoreBundle\OrderProcessing\PaymentProcessorInterface;
use Sylius\Bundle\CoreBundle\SyliusOrderEvents;
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
+use Sylius\Component\Payment\Model\PaymentInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
diff --git a/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/EventListener/PurchaseListenerSpec.php b/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/EventListener/PurchaseListenerSpec.php
index edfc933c95..dfc899843a 100644
--- a/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/EventListener/PurchaseListenerSpec.php
+++ b/src/Sylius/Bundle/CoreBundle/spec/Sylius/Bundle/CoreBundle/EventListener/PurchaseListenerSpec.php
@@ -13,14 +13,14 @@ namespace spec\Sylius\Bundle\CoreBundle\EventListener;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
+use Sylius\Bundle\CartBundle\Provider\CartProviderInterface;
+use Sylius\Bundle\CoreBundle\Event\PurchaseCompleteEvent;
+use Sylius\Component\Payment\Model\PaymentInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
-use Sylius\Bundle\CartBundle\Provider\CartProviderInterface;
-use Sylius\Bundle\CoreBundle\Event\PurchaseCompleteEvent;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
class PurchaseListenerSpec extends ObjectBehavior
{
diff --git a/src/Sylius/Bundle/FixturesBundle/DataFixtures/ORM/LoadOrdersData.php b/src/Sylius/Bundle/FixturesBundle/DataFixtures/ORM/LoadOrdersData.php
index 2be0120b49..db45df9381 100644
--- a/src/Sylius/Bundle/FixturesBundle/DataFixtures/ORM/LoadOrdersData.php
+++ b/src/Sylius/Bundle/FixturesBundle/DataFixtures/ORM/LoadOrdersData.php
@@ -19,7 +19,7 @@ use Sylius\Bundle\CoreBundle\Model\OrderInterface;
use Sylius\Bundle\CoreBundle\Model\OrderItemInterface;
use Sylius\Bundle\CoreBundle\Model\ShipmentInterface;
use Sylius\Bundle\OrderBundle\SyliusOrderEvents;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
+use Sylius\Component\Payment\Model\PaymentInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
class LoadOrdersData extends DataFixture
diff --git a/src/Sylius/Bundle/PaymentsBundle/.gitignore b/src/Sylius/Bundle/PaymentBundle/.gitignore
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/.gitignore
rename to src/Sylius/Bundle/PaymentBundle/.gitignore
diff --git a/src/Sylius/Bundle/PaymentsBundle/.travis.yml b/src/Sylius/Bundle/PaymentBundle/.travis.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/.travis.yml
rename to src/Sylius/Bundle/PaymentBundle/.travis.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php
similarity index 89%
rename from src/Sylius/Bundle/PaymentsBundle/DependencyInjection/Configuration.php
rename to src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php
index 0406939f77..81eb354be0 100644
--- a/src/Sylius/Bundle/PaymentsBundle/DependencyInjection/Configuration.php
+++ b/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\DependencyInjection;
+namespace Sylius\Bundle\PaymentBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
@@ -31,7 +31,7 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
- $rootNode = $treeBuilder->root('sylius_payments');
+ $rootNode = $treeBuilder->root('sylius_payment');
$rootNode
->addDefaultsIfNotSet()
@@ -64,28 +64,28 @@ class Configuration implements ConfigurationInterface
->arrayNode('payment_method')
->addDefaultsIfNotSet()
->children()
- ->scalarNode('model')->defaultValue('Sylius\Bundle\PaymentsBundle\Model\PaymentMethod')->end()
+ ->scalarNode('model')->defaultValue('Sylius\Component\Payment\Model\PaymentMethod')->end()
->scalarNode('controller')->defaultValue('Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController')->end()
->scalarNode('repository')->end()
- ->scalarNode('form')->defaultValue('Sylius\\Bundle\\PaymentsBundle\\Form\\Type\\PaymentMethodType')->end()
+ ->scalarNode('form')->defaultValue('Sylius\\Bundle\\PaymentBundle\\Form\\Type\\PaymentMethodType')->end()
->end()
->end()
->arrayNode('payment')
->addDefaultsIfNotSet()
->children()
- ->scalarNode('model')->defaultValue('Sylius\Bundle\PaymentsBundle\Model\Payment')->end()
+ ->scalarNode('model')->defaultValue('Sylius\Component\Payment\Model\Payment')->end()
->scalarNode('controller')->defaultValue('Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController')->end()
->scalarNode('repository')->end()
- ->scalarNode('form')->defaultValue('Sylius\\Bundle\\PaymentsBundle\\Form\\Type\\PaymentType')->end()
+ ->scalarNode('form')->defaultValue('Sylius\\Bundle\\PaymentBundle\\Form\\Type\\PaymentType')->end()
->end()
->end()
->arrayNode('credit_card')
->addDefaultsIfNotSet()
->children()
- ->scalarNode('model')->defaultValue('Sylius\Bundle\PaymentsBundle\Model\CreditCard')->end()
+ ->scalarNode('model')->defaultValue('Sylius\Component\Payment\Model\CreditCard')->end()
->scalarNode('controller')->defaultValue('Sylius\\Bundle\\ResourceBundle\\Controller\\ResourceController')->end()
->scalarNode('repository')->end()
- ->scalarNode('form')->defaultValue('Sylius\\Bundle\\PaymentsBundle\\Form\\Type\\CreditCardType')->end()
+ ->scalarNode('form')->defaultValue('Sylius\\Bundle\\PaymentBundle\\Form\\Type\\CreditCardType')->end()
->end()
->end()
->end()
diff --git a/src/Sylius/Bundle/PaymentsBundle/DependencyInjection/SyliusPaymentsExtension.php b/src/Sylius/Bundle/PaymentBundle/DependencyInjection/SyliusPaymentExtension.php
similarity index 87%
rename from src/Sylius/Bundle/PaymentsBundle/DependencyInjection/SyliusPaymentsExtension.php
rename to src/Sylius/Bundle/PaymentBundle/DependencyInjection/SyliusPaymentExtension.php
index f4dae08abb..a807a465fc 100644
--- a/src/Sylius/Bundle/PaymentsBundle/DependencyInjection/SyliusPaymentsExtension.php
+++ b/src/Sylius/Bundle/PaymentBundle/DependencyInjection/SyliusPaymentExtension.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\DependencyInjection;
+namespace Sylius\Bundle\PaymentBundle\DependencyInjection;
use Sylius\Bundle\ResourceBundle\DependencyInjection\AbstractResourceExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
*
* @author Paweł Jędrzejewski
*/
-class SyliusPaymentsExtension extends AbstractResourceExtension
+class SyliusPaymentExtension extends AbstractResourceExtension
{
/**
* {@inheritdoc}
diff --git a/src/Sylius/Bundle/PaymentsBundle/Form/Type/CreditCardType.php b/src/Sylius/Bundle/PaymentBundle/Form/Type/CreditCardType.php
similarity index 98%
rename from src/Sylius/Bundle/PaymentsBundle/Form/Type/CreditCardType.php
rename to src/Sylius/Bundle/PaymentBundle/Form/Type/CreditCardType.php
index 77ce5aaf19..827f3f18f6 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Form/Type/CreditCardType.php
+++ b/src/Sylius/Bundle/PaymentBundle/Form/Type/CreditCardType.php
@@ -9,11 +9,11 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Form\Type;
+namespace Sylius\Bundle\PaymentBundle\Form\Type;
+use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
-use Symfony\Component\Form\AbstractType;
/**
* Credit Card Form Type
diff --git a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentGatewayChoiceType.php b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentGatewayChoiceType.php
similarity index 96%
rename from src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentGatewayChoiceType.php
rename to src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentGatewayChoiceType.php
index b76f5ef53c..276ce46deb 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentGatewayChoiceType.php
+++ b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentGatewayChoiceType.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Form\Type;
+namespace Sylius\Bundle\PaymentBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
diff --git a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodChoiceType.php b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php
similarity index 95%
rename from src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodChoiceType.php
rename to src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php
index 04d7240582..3dcd13135a 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodChoiceType.php
+++ b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Form\Type;
+namespace Sylius\Bundle\PaymentBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
diff --git a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodEntityType.php b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodEntityType.php
similarity index 96%
rename from src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodEntityType.php
rename to src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodEntityType.php
index 06a983b745..1e8fee488e 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodEntityType.php
+++ b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodEntityType.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Form\Type;
+namespace Sylius\Bundle\PaymentBundle\Form\Type;
use Doctrine\ORM\EntityRepository;
use Symfony\Component\OptionsResolver\Options;
diff --git a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodType.php b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodType.php
similarity index 97%
rename from src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodType.php
rename to src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodType.php
index 5451bdddc7..1fc143b6cb 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodType.php
+++ b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodType.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Form\Type;
+namespace Sylius\Bundle\PaymentBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
diff --git a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentType.php b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentType.php
similarity index 96%
rename from src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentType.php
rename to src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentType.php
index ff227f4956..94cda1f598 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentType.php
+++ b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentType.php
@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Form\Type;
+namespace Sylius\Bundle\PaymentBundle\Form\Type;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
+use Sylius\Component\Payment\Model\PaymentInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
diff --git a/src/Sylius/Bundle/PaymentsBundle/README.md b/src/Sylius/Bundle/PaymentBundle/README.md
similarity index 85%
rename from src/Sylius/Bundle/PaymentsBundle/README.md
rename to src/Sylius/Bundle/PaymentBundle/README.md
index 891b3d6fdb..dddcb71c81 100644
--- a/src/Sylius/Bundle/PaymentsBundle/README.md
+++ b/src/Sylius/Bundle/PaymentBundle/README.md
@@ -1,4 +1,4 @@
-SyliusPaymentsBundle [](http://travis-ci.org/Sylius/SyliusPaymentsBundle)
+SyliusPaymentBundle [](http://travis-ci.org/Sylius/SyliusPaymentBundle)
====================
Payments component for [**Symfony2**](http://symfony.com) ecommerce applications.
@@ -19,7 +19,7 @@ $ bin/phpspec run -f pretty
Documentation
-------------
-Documentation is available on [**docs.sylius.org**](http://docs.sylius.org/en/latest/bundles/SyliusPaymentsBundle/index.html).
+Documentation is available on [**docs.sylius.org**](http://docs.sylius.org/en/latest/bundles/SyliusPaymentBundle/index.html).
Contributing
------------
@@ -45,7 +45,7 @@ If you want to keep up with updates, [follow the official Sylius account on twit
Bug tracking
------------
-This bundle uses [GitHub issues](https://github.com/Sylius/SyliusPaymentsBundle/issues).
+This bundle uses [GitHub issues](https://github.com/Sylius/SyliusPaymentBundle/issues).
If you have found bug, please create an issue.
Versioning
@@ -65,10 +65,10 @@ This versioning method is same for all **Sylius** bundles and applications.
MIT License
-----------
-License can be found [here](https://github.com/Sylius/SyliusPaymentsBundle/blob/master/Resources/meta/LICENSE).
+License can be found [here](https://github.com/Sylius/SyliusPaymentBundle/blob/master/Resources/meta/LICENSE).
Authors
-------
The bundle was originally created by [Paweł Jędrzejewski](http://pjedrzejewski.com).
-See the list of [contributors](https://github.com/Sylius/SyliusPaymentsBundle/contributors).
+See the list of [contributors](https://github.com/Sylius/SyliusPaymentBundle/contributors).
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/config/doctrine/model/CreditCard.orm.xml b/src/Sylius/Bundle/PaymentBundle/Resources/config/doctrine/model/CreditCard.orm.xml
similarity index 93%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/config/doctrine/model/CreditCard.orm.xml
rename to src/Sylius/Bundle/PaymentBundle/Resources/config/doctrine/model/CreditCard.orm.xml
index 6aa22de253..9047441345 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Resources/config/doctrine/model/CreditCard.orm.xml
+++ b/src/Sylius/Bundle/PaymentBundle/Resources/config/doctrine/model/CreditCard.orm.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/config/doctrine/model/Payment.orm.xml b/src/Sylius/Bundle/PaymentBundle/Resources/config/doctrine/model/Payment.orm.xml
similarity index 84%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/config/doctrine/model/Payment.orm.xml
rename to src/Sylius/Bundle/PaymentBundle/Resources/config/doctrine/model/Payment.orm.xml
index 89bfac7107..106310d97d 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Resources/config/doctrine/model/Payment.orm.xml
+++ b/src/Sylius/Bundle/PaymentBundle/Resources/config/doctrine/model/Payment.orm.xml
@@ -14,12 +14,12 @@
-
+
-
+
@@ -36,7 +36,7 @@
-
+
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/config/doctrine/model/PaymentMethod.orm.xml b/src/Sylius/Bundle/PaymentBundle/Resources/config/doctrine/model/PaymentMethod.orm.xml
similarity index 91%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/config/doctrine/model/PaymentMethod.orm.xml
rename to src/Sylius/Bundle/PaymentBundle/Resources/config/doctrine/model/PaymentMethod.orm.xml
index 56b0b9272c..788840c2dd 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Resources/config/doctrine/model/PaymentMethod.orm.xml
+++ b/src/Sylius/Bundle/PaymentBundle/Resources/config/doctrine/model/PaymentMethod.orm.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/config/driver/doctrine/orm.xml b/src/Sylius/Bundle/PaymentBundle/Resources/config/driver/doctrine/orm.xml
similarity index 88%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/config/driver/doctrine/orm.xml
rename to src/Sylius/Bundle/PaymentBundle/Resources/config/driver/doctrine/orm.xml
index 55280253f9..658bc8ea48 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Resources/config/driver/doctrine/orm.xml
+++ b/src/Sylius/Bundle/PaymentBundle/Resources/config/driver/doctrine/orm.xml
@@ -17,7 +17,7 @@
http://symfony.com/schema/dic/services/services-1.0.xsd">
- Sylius\Bundle\PaymentsBundle\Form\Type\PaymentMethodEntityType
+ Sylius\Bundle\PaymentBundle\Form\Type\PaymentMethodEntityType
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/config/services.xml b/src/Sylius/Bundle/PaymentBundle/Resources/config/services.xml
similarity index 93%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/config/services.xml
rename to src/Sylius/Bundle/PaymentBundle/Resources/config/services.xml
index cc62305b70..ac0a4fd3b4 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Resources/config/services.xml
+++ b/src/Sylius/Bundle/PaymentBundle/Resources/config/services.xml
@@ -17,8 +17,8 @@
http://symfony.com/schema/dic/services/services-1.0.xsd">
- Sylius\Bundle\PaymentsBundle\Form\Type\PaymentGatewayChoiceType
- Sylius\Bundle\PaymentsBundle\Form\Type\CreditCardType
+ Sylius\Bundle\PaymentBundle\Form\Type\PaymentGatewayChoiceType
+ Sylius\Bundle\PaymentBundle\Form\Type\CreditCardType
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/config/validation.xml b/src/Sylius/Bundle/PaymentBundle/Resources/config/validation.xml
similarity index 96%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/config/validation.xml
rename to src/Sylius/Bundle/PaymentBundle/Resources/config/validation.xml
index b2f6965dd0..0a298b81c9 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Resources/config/validation.xml
+++ b/src/Sylius/Bundle/PaymentBundle/Resources/config/validation.xml
@@ -16,7 +16,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping
http://symfony.com/schema/dic/services/constraint-mapping-1.0.xsd">
-
+
@@ -38,7 +38,7 @@
-
+
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/meta/LICENSE b/src/Sylius/Bundle/PaymentBundle/Resources/meta/LICENSE
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/meta/LICENSE
rename to src/Sylius/Bundle/PaymentBundle/Resources/meta/LICENSE
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.af.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.af.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.af.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.af.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ar.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ar.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ar.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ar.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.bg.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.bg.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.bg.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.bg.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ca.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ca.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ca.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ca.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.cs.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.cs.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.cs.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.cs.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.da.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.da.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.da.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.da.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.de.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.de.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.de.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.de.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.el.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.el.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.el.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.el.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.en.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.en.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.en.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.en.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.es.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.es.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.es.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.es.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.et.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.et.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.et.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.et.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.fi.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.fi.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.fi.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.fi.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.fr.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.fr.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.fr.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.fr.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.he.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.he.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.he.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.he.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.hr.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.hr.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.hr.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.hr.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.hu.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.hu.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.hu.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.hu.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.id.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.id.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.id.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.id.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.it.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.it.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.it.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.it.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ja.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ja.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ja.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ja.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ko.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ko.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ko.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ko.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.nl.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.nl.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.nl.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.nl.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.no.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.no.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.no.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.no.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.pl.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.pl.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.pl.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.pl.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.pt.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.pt.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.pt.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.pt.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ro.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ro.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ro.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ro.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ru.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ru.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.ru.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.ru.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.sk.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.sk.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.sk.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.sk.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.sl.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.sl.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.sl.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.sl.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.sr.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.sr.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.sr.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.sr.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.sv.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.sv.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.sv.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.sv.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.th.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.th.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.th.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.th.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.tr.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.tr.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.tr.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.tr.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.uk.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.uk.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.uk.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.uk.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.vi.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.vi.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.vi.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.vi.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.zh.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.zh.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/messages.zh.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/messages.zh.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.af.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.af.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.af.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.af.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ar.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ar.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ar.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ar.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.bg.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.bg.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.bg.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.bg.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ca.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ca.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ca.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ca.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.cs.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.cs.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.cs.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.cs.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.da.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.da.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.da.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.da.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.de.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.de.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.de.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.de.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.el.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.el.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.el.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.el.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.en.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.en.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.en.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.en.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.es.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.es.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.es.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.es.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.et.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.et.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.et.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.et.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.fi.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.fi.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.fi.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.fi.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.fr.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.fr.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.fr.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.fr.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.he.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.he.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.he.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.he.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.hr.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.hr.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.hr.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.hr.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.hu.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.hu.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.hu.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.hu.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.id.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.id.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.id.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.id.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.it.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.it.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.it.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.it.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ja.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ja.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ja.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ja.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ko.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ko.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ko.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ko.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.nl.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.nl.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.nl.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.nl.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.no.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.no.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.no.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.no.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.pl.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.pl.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.pl.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.pl.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.pt.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.pt.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.pt.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.pt.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ro.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ro.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ro.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ro.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ru.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ru.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.ru.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.ru.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.sk.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.sk.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.sk.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.sk.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.sl.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.sl.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.sl.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.sl.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.sr.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.sr.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.sr.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.sr.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.sv.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.sv.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.sv.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.sv.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.th.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.th.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.th.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.th.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.tr.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.tr.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.tr.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.tr.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.uk.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.uk.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.uk.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.uk.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.vi.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.vi.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.vi.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.vi.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.zh.yml b/src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.zh.yml
similarity index 100%
rename from src/Sylius/Bundle/PaymentsBundle/Resources/translations/validators.zh.yml
rename to src/Sylius/Bundle/PaymentBundle/Resources/translations/validators.zh.yml
diff --git a/src/Sylius/Bundle/PaymentsBundle/SyliusPaymentsBundle.php b/src/Sylius/Bundle/PaymentBundle/SyliusPaymentBundle.php
similarity index 76%
rename from src/Sylius/Bundle/PaymentsBundle/SyliusPaymentsBundle.php
rename to src/Sylius/Bundle/PaymentBundle/SyliusPaymentBundle.php
index 80d1dd1694..0046310287 100644
--- a/src/Sylius/Bundle/PaymentsBundle/SyliusPaymentsBundle.php
+++ b/src/Sylius/Bundle/PaymentBundle/SyliusPaymentBundle.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle;
+namespace Sylius\Bundle\PaymentBundle;
use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass;
use Sylius\Bundle\ResourceBundle\DependencyInjection\Compiler\ResolveDoctrineTargetEntitiesPass;
@@ -22,7 +22,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
*
* @author Paweł Jędrzejewski
*/
-class SyliusPaymentsBundle extends Bundle
+class SyliusPaymentBundle extends Bundle
{
/**
* Return array of currently supported database drivers.
@@ -42,15 +42,15 @@ class SyliusPaymentsBundle extends Bundle
public function build(ContainerBuilder $container)
{
$interfaces = array(
- 'Sylius\Bundle\PaymentsBundle\Model\CreditCardInterface' => 'sylius.model.credit_card.class',
- 'Sylius\Bundle\PaymentsBundle\Model\PaymentInterface' => 'sylius.model.payment.class',
- 'Sylius\Bundle\PaymentsBundle\Model\PaymentMethodInterface' => 'sylius.model.payment_method.class',
+ 'Sylius\Component\Payment\Model\CreditCardInterface' => 'sylius.model.credit_card.class',
+ 'Sylius\Component\Payment\Model\PaymentInterface' => 'sylius.model.payment.class',
+ 'Sylius\Component\Payment\Model\PaymentMethodInterface' => 'sylius.model.payment_method.class',
);
$container->addCompilerPass(new ResolveDoctrineTargetEntitiesPass('sylius_payments', $interfaces));
$mappings = array(
- realpath(__DIR__.'/Resources/config/doctrine/model') => 'Sylius\Bundle\PaymentsBundle\Model',
+ realpath(__DIR__.'/Resources/config/doctrine/model') => 'Sylius\Component\Payment\Model',
);
$container->addCompilerPass(DoctrineOrmMappingsPass::createXmlMappingDriver($mappings, array('doctrine.orm.entity_manager'), 'sylius_payments.driver.doctrine/orm'));
diff --git a/src/Sylius/Bundle/PaymentsBundle/SyliusPaymentEvents.php b/src/Sylius/Bundle/PaymentBundle/SyliusPaymentEvents.php
similarity index 90%
rename from src/Sylius/Bundle/PaymentsBundle/SyliusPaymentEvents.php
rename to src/Sylius/Bundle/PaymentBundle/SyliusPaymentEvents.php
index b5da9b280d..1f1f7f001c 100644
--- a/src/Sylius/Bundle/PaymentsBundle/SyliusPaymentEvents.php
+++ b/src/Sylius/Bundle/PaymentBundle/SyliusPaymentEvents.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle;
+namespace Sylius\Bundle\PaymentBundle;
final class SyliusPaymentEvents
{
diff --git a/src/Sylius/Bundle/PaymentsBundle/composer.json b/src/Sylius/Bundle/PaymentBundle/composer.json
similarity index 83%
rename from src/Sylius/Bundle/PaymentsBundle/composer.json
rename to src/Sylius/Bundle/PaymentBundle/composer.json
index 52089dafce..0f72b16e69 100644
--- a/src/Sylius/Bundle/PaymentsBundle/composer.json
+++ b/src/Sylius/Bundle/PaymentBundle/composer.json
@@ -23,7 +23,8 @@
"php": ">=5.3.3",
"symfony/framework-bundle": "~2.3",
- "sylius/resource-bundle": "0.9.*@dev",
+ "sylius/resource-bundle": "0.10.*@dev",
+ "sylius/payment": "0.10.*@dev",
"stof/doctrine-extensions-bundle": "1.1.*"
},
"require-dev": {
@@ -35,9 +36,9 @@
"bin-dir": "bin"
},
"autoload": {
- "psr-0": { "Sylius\\Bundle\\PaymentsBundle\\": "" }
+ "psr-0": { "Sylius\\Bundle\\PaymentBundle\\": "" }
},
- "target-dir": "Sylius/Bundle/PaymentsBundle",
+ "target-dir": "Sylius/Bundle/PaymentBundle",
"extra": {
"branch-alias": {
"dev-master": "0.9-dev"
diff --git a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Form/Type/CreditCardTypeSpec.php b/src/Sylius/Bundle/PaymentBundle/spec/Sylius/Bundle/PaymentBundle/Form/Type/CreditCardTypeSpec.php
similarity index 97%
rename from src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Form/Type/CreditCardTypeSpec.php
rename to src/Sylius/Bundle/PaymentBundle/spec/Sylius/Bundle/PaymentBundle/Form/Type/CreditCardTypeSpec.php
index 5c0ce4b25b..5870104e74 100644
--- a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Form/Type/CreditCardTypeSpec.php
+++ b/src/Sylius/Bundle/PaymentBundle/spec/Sylius/Bundle/PaymentBundle/Form/Type/CreditCardTypeSpec.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace spec\Sylius\Bundle\PaymentsBundle\Form\Type;
+namespace spec\Sylius\Bundle\PaymentBundle\Form\Type;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
diff --git a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodTypeSpec.php b/src/Sylius/Bundle/PaymentBundle/spec/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodTypeSpec.php
similarity index 97%
rename from src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodTypeSpec.php
rename to src/Sylius/Bundle/PaymentBundle/spec/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodTypeSpec.php
index 8f5ab0c6c0..9234a0a751 100644
--- a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Form/Type/PaymentMethodTypeSpec.php
+++ b/src/Sylius/Bundle/PaymentBundle/spec/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodTypeSpec.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace spec\Sylius\Bundle\PaymentsBundle\Form\Type;
+namespace spec\Sylius\Bundle\PaymentBundle\Form\Type;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
diff --git a/src/Sylius/Bundle/PayumBundle/.travis.yml b/src/Sylius/Bundle/PayumBundle/.travis.yml
new file mode 100644
index 0000000000..30d02acdc8
--- /dev/null
+++ b/src/Sylius/Bundle/PayumBundle/.travis.yml
@@ -0,0 +1,14 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
+ - 5.5
+
+before_script: composer install --prefer-source --no-interaction
+
+script: bin/phpspec run -fpretty --verbose
+
+notifications:
+ email: "travis-ci@sylius.org"
+ irc: "irc.freenode.org#sylius-dev"
diff --git a/src/Sylius/Bundle/PayumBundle/Payum/Action/ExecuteSameRequestWithPaymentDetailsAction.php b/src/Sylius/Bundle/PayumBundle/Payum/Action/ExecuteSameRequestWithPaymentDetailsAction.php
index a88a2de313..f9cc0b4ad8 100644
--- a/src/Sylius/Bundle/PayumBundle/Payum/Action/ExecuteSameRequestWithPaymentDetailsAction.php
+++ b/src/Sylius/Bundle/PayumBundle/Payum/Action/ExecuteSameRequestWithPaymentDetailsAction.php
@@ -15,7 +15,7 @@ use Payum\Core\Action\PaymentAwareAction;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\Request\ModelRequestInterface;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
+use Sylius\Component\Payment\Model\PaymentInterface;
class ExecuteSameRequestWithPaymentDetailsAction extends PaymentAwareAction
{
diff --git a/src/Sylius/Bundle/PayumBundle/Payum/Be2bill/Action/NotifyAction.php b/src/Sylius/Bundle/PayumBundle/Payum/Be2bill/Action/NotifyAction.php
index d9d48a2f78..9f8c9cd8c6 100644
--- a/src/Sylius/Bundle/PayumBundle/Payum/Be2bill/Action/NotifyAction.php
+++ b/src/Sylius/Bundle/PayumBundle/Payum/Be2bill/Action/NotifyAction.php
@@ -18,7 +18,7 @@ use Payum\Core\Action\PaymentAwareAction;
use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\Request\NotifyRequest;
use Sylius\Bundle\OrderBundle\Repository\OrderRepositoryInterface;
-use Sylius\Bundle\PaymentsBundle\SyliusPaymentEvents;
+use Sylius\Bundle\PaymentBundle\SyliusPaymentEvents;
use Sylius\Bundle\PayumBundle\Payum\Request\StatusRequest;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Response;
diff --git a/src/Sylius/Bundle/PayumBundle/Payum/Paypal/Action/NotifyOrderAction.php b/src/Sylius/Bundle/PayumBundle/Payum/Paypal/Action/NotifyOrderAction.php
index ca45a8fcab..0aa6e23e06 100644
--- a/src/Sylius/Bundle/PayumBundle/Payum/Paypal/Action/NotifyOrderAction.php
+++ b/src/Sylius/Bundle/PayumBundle/Payum/Paypal/Action/NotifyOrderAction.php
@@ -17,7 +17,7 @@ use Payum\Core\Exception\RequestNotSupportedException;
use Payum\Core\Request\SecuredNotifyRequest;
use Payum\Core\Request\SyncRequest;
use Sylius\Bundle\CoreBundle\Model\OrderInterface;
-use Sylius\Bundle\PaymentsBundle\SyliusPaymentEvents;
+use Sylius\Bundle\PaymentBundle\SyliusPaymentEvents;
use Sylius\Bundle\PayumBundle\Payum\Request\StatusRequest;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
@@ -36,6 +36,7 @@ class NotifyOrderAction extends PaymentAwareAction
/**
* @param EventDispatcherInterface $eventDispatcher
+ * @param ObjectManager $objectManager
*/
public function __construct(EventDispatcherInterface $eventDispatcher, ObjectManager $objectManager)
{
diff --git a/src/Sylius/Bundle/PayumBundle/Payum/Request/ObtainCreditCardRequest.php b/src/Sylius/Bundle/PayumBundle/Payum/Request/ObtainCreditCardRequest.php
index f74dabb32b..bd07e1234e 100644
--- a/src/Sylius/Bundle/PayumBundle/Payum/Request/ObtainCreditCardRequest.php
+++ b/src/Sylius/Bundle/PayumBundle/Payum/Request/ObtainCreditCardRequest.php
@@ -11,8 +11,8 @@
namespace Sylius\Bundle\PayumBundle\Payum\Request;
-use Sylius\Bundle\PaymentsBundle\Model\CreditCardInterface;
use Sylius\Bundle\OrderBundle\Model\OrderInterface;
+use Sylius\Component\Payment\Model\CreditCardInterface;
class ObtainCreditCardRequest
{
diff --git a/src/Sylius/Bundle/PayumBundle/Payum/Request/StatusRequest.php b/src/Sylius/Bundle/PayumBundle/Payum/Request/StatusRequest.php
index 3933865f3c..0af396b690 100644
--- a/src/Sylius/Bundle/PayumBundle/Payum/Request/StatusRequest.php
+++ b/src/Sylius/Bundle/PayumBundle/Payum/Request/StatusRequest.php
@@ -12,7 +12,7 @@
namespace Sylius\Bundle\PayumBundle\Payum\Request;
use Payum\Core\Request\BaseStatusRequest;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
+use Sylius\Component\Payment\Model\PaymentInterface;
class StatusRequest extends BaseStatusRequest
{
diff --git a/src/Sylius/Bundle/PayumBundle/spec/Sylius/Bundle/PayumBundle/Model/PaymentSecurityTokenSpec.php b/src/Sylius/Bundle/PayumBundle/spec/Sylius/Bundle/PayumBundle/Model/PaymentSecurityTokenSpec.php
index e35d284fc2..efc9f15973 100644
--- a/src/Sylius/Bundle/PayumBundle/spec/Sylius/Bundle/PayumBundle/Model/PaymentSecurityTokenSpec.php
+++ b/src/Sylius/Bundle/PayumBundle/spec/Sylius/Bundle/PayumBundle/Model/PaymentSecurityTokenSpec.php
@@ -1,5 +1,14 @@
-{% if constant('Sylius\\Bundle\\OrderBundle\\Model\\OrderInterface::STATE_PENDING') == order.state and constant('Sylius\\Bundle\\PaymentsBundle\\Model\\PaymentInterface::STATE_NEW') == order.paymentState %}
+{% if constant('Sylius\\Bundle\\OrderBundle\\Model\\OrderInterface::STATE_PENDING') == order.state and constant('Sylius\\Component\\Payment\\Model\\PaymentInterface::STATE_NEW') == order.paymentState %}
-{% elseif 1 == order.shipments|length and constant('Sylius\\Bundle\\OrderBundle\\Model\\OrderInterface::STATE_CONFIRMED') == order.state and constant('Sylius\\Bundle\\PaymentsBundle\\Model\\PaymentInterface::STATE_COMPLETED') == order.paymentState %}
+{% elseif 1 == order.shipments|length and constant('Sylius\\Bundle\\OrderBundle\\Model\\OrderInterface::STATE_CONFIRMED') == order.state and constant('Sylius\\Component\\Payment\\Model\\PaymentInterface::STATE_COMPLETED') == order.paymentState %}
diff --git a/src/Sylius/Component/Payment/.gitignore b/src/Sylius/Component/Payment/.gitignore
new file mode 100644
index 0000000000..46aed33710
--- /dev/null
+++ b/src/Sylius/Component/Payment/.gitignore
@@ -0,0 +1,5 @@
+vendor/
+bin/
+
+composer.phar
+composer.lock
diff --git a/src/Sylius/Component/Payment/.travis.yml b/src/Sylius/Component/Payment/.travis.yml
new file mode 100644
index 0000000000..ed58446d7e
--- /dev/null
+++ b/src/Sylius/Component/Payment/.travis.yml
@@ -0,0 +1,14 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
+ - 5.5
+
+before_script: composer install --prefer-source --no-interaction
+
+script: bin/phpspec run -fpretty --verbose
+
+notifications:
+ email: "travis-ci@sylius.org"
+ irc: "irc.freenode.org#sylius-dev"
diff --git a/src/Sylius/Component/Payment/CHANGELOG.md b/src/Sylius/Component/Payment/CHANGELOG.md
new file mode 100644
index 0000000000..c1b23e6755
--- /dev/null
+++ b/src/Sylius/Component/Payment/CHANGELOG.md
@@ -0,0 +1,6 @@
+CHANGELOG
+=========
+
+### v0.9.0
+
+* Initial dev release.
diff --git a/src/Sylius/Component/Payment/LICENSE b/src/Sylius/Component/Payment/LICENSE
new file mode 100644
index 0000000000..3f2217e164
--- /dev/null
+++ b/src/Sylius/Component/Payment/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2011-2014 Paweł Jędrzejewski
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/src/Sylius/Bundle/PaymentsBundle/Model/CreditCard.php b/src/Sylius/Component/Payment/Model/CreditCard.php
similarity index 98%
rename from src/Sylius/Bundle/PaymentsBundle/Model/CreditCard.php
rename to src/Sylius/Component/Payment/Model/CreditCard.php
index 475ffb0f0c..7cef0b2c5d 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Model/CreditCard.php
+++ b/src/Sylius/Component/Payment/Model/CreditCard.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Model;
+namespace Sylius\Component\Payment\Model;
/**
* Credit card model.
diff --git a/src/Sylius/Bundle/PaymentsBundle/Model/CreditCardInterface.php b/src/Sylius/Component/Payment/Model/CreditCardInterface.php
similarity index 98%
rename from src/Sylius/Bundle/PaymentsBundle/Model/CreditCardInterface.php
rename to src/Sylius/Component/Payment/Model/CreditCardInterface.php
index c0a51c44ff..f43263e738 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Model/CreditCardInterface.php
+++ b/src/Sylius/Component/Payment/Model/CreditCardInterface.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Model;
+namespace Sylius\Component\Payment\Model;
use Sylius\Bundle\ResourceBundle\Model\TimestampableInterface;
diff --git a/src/Sylius/Bundle/PaymentsBundle/Model/Payment.php b/src/Sylius/Component/Payment/Model/Payment.php
similarity index 96%
rename from src/Sylius/Bundle/PaymentsBundle/Model/Payment.php
rename to src/Sylius/Component/Payment/Model/Payment.php
index 00a80cc58e..79d0a633f1 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Model/Payment.php
+++ b/src/Sylius/Component/Payment/Model/Payment.php
@@ -9,10 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Model;
-
-use Doctrine\Common\Collections\ArrayCollection;
-use Doctrine\Common\Collections\Collection;
+namespace Sylius\Component\Payment\Model;
/**
* Payments model.
diff --git a/src/Sylius/Bundle/PaymentsBundle/Model/PaymentInterface.php b/src/Sylius/Component/Payment/Model/PaymentInterface.php
similarity index 96%
rename from src/Sylius/Bundle/PaymentsBundle/Model/PaymentInterface.php
rename to src/Sylius/Component/Payment/Model/PaymentInterface.php
index 5de2a4e539..3ff5baf995 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Model/PaymentInterface.php
+++ b/src/Sylius/Component/Payment/Model/PaymentInterface.php
@@ -9,9 +9,8 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Model;
+namespace Sylius\Component\Payment\Model;
-use Doctrine\Common\Collections\Collection;
use Sylius\Bundle\ResourceBundle\Model\TimestampableInterface;
/**
diff --git a/src/Sylius/Bundle/PaymentsBundle/Model/PaymentMethod.php b/src/Sylius/Component/Payment/Model/PaymentMethod.php
similarity index 98%
rename from src/Sylius/Bundle/PaymentsBundle/Model/PaymentMethod.php
rename to src/Sylius/Component/Payment/Model/PaymentMethod.php
index e4a93b0e32..f829e5a8b3 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Model/PaymentMethod.php
+++ b/src/Sylius/Component/Payment/Model/PaymentMethod.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Model;
+namespace Sylius\Component\Payment\Model;
/**
* Payments method model.
diff --git a/src/Sylius/Bundle/PaymentsBundle/Model/PaymentMethodInterface.php b/src/Sylius/Component/Payment/Model/PaymentMethodInterface.php
similarity index 97%
rename from src/Sylius/Bundle/PaymentsBundle/Model/PaymentMethodInterface.php
rename to src/Sylius/Component/Payment/Model/PaymentMethodInterface.php
index 58e95cbaef..2c7303bfef 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Model/PaymentMethodInterface.php
+++ b/src/Sylius/Component/Payment/Model/PaymentMethodInterface.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Model;
+namespace Sylius\Component\Payment\Model;
use Sylius\Bundle\ResourceBundle\Model\TimestampableInterface;
diff --git a/src/Sylius/Bundle/PaymentsBundle/Model/PaymentSourceInterface.php b/src/Sylius/Component/Payment/Model/PaymentSourceInterface.php
similarity index 88%
rename from src/Sylius/Bundle/PaymentsBundle/Model/PaymentSourceInterface.php
rename to src/Sylius/Component/Payment/Model/PaymentSourceInterface.php
index ac14083706..41940a5f14 100644
--- a/src/Sylius/Bundle/PaymentsBundle/Model/PaymentSourceInterface.php
+++ b/src/Sylius/Component/Payment/Model/PaymentSourceInterface.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Sylius\Bundle\PaymentsBundle\Model;
+namespace Sylius\Component\Payment\Model;
/**
* Payment source interface.
diff --git a/src/Sylius/Component/Payment/README.md b/src/Sylius/Component/Payment/README.md
new file mode 100644
index 0000000000..5172379557
--- /dev/null
+++ b/src/Sylius/Component/Payment/README.md
@@ -0,0 +1,74 @@
+Payment Component [](http://travis-ci.org/Sylius/Payment)
+=================
+
+Payment management for PHP ecommerce applications.
+
+Sylius
+------
+
+**Sylius** - Modern e-commerce for PHP. Visit [Sylius.org](http://sylius.org).
+
+[phpspec](http://phpspec.net) examples
+--------------------------------------
+
+```bash
+$ composer install
+$ bin/phpspec run -f pretty
+```
+
+Documentation
+-------------
+
+Documentation is available on [**docs.sylius.org**](http://docs.sylius.org/en/latest/components/Payment/index.html).
+
+Contributing
+------------
+
+All informations about contributing to Sylius can be found on [this page](http://docs.sylius.org/en/latest/contributing/index.html).
+
+Mailing lists
+-------------
+
+### Users
+
+Questions? Feel free to ask on [users mailing list](http://groups.google.com/group/sylius).
+
+### Developers
+
+To contribute and develop this bundle, use the [developers mailing list](http://groups.google.com/group/sylius-dev).
+
+Sylius twitter account
+----------------------
+
+If you want to keep up with updates, [follow the official Sylius account on twitter](http://twitter.com/Sylius).
+
+Bug tracking
+------------
+
+This bundle uses [GitHub issues](https://github.com/Sylius/Sylius/issues).
+If you have found bug, please create an issue.
+
+Versioning
+----------
+
+Releases will be numbered with the format `major.minor.patch`.
+
+And constructed with the following guidelines.
+
+* Breaking backwards compatibility bumps the major.
+* New additions without breaking backwards compatibility bumps the minor.
+* Bug fixes and misc changes bump the patch.
+
+For more information on SemVer, please visit [semver.org website](http://semver.org/).
+This versioning method is same for all **Sylius** bundles and applications.
+
+MIT License
+-----------
+
+License can be found [here](https://github.com/Sylius/Payment/blob/master/LICENSE).
+
+Authors
+-------
+
+The bundle was originally created by [Paweł Jędrzejewski](http://pjedrzejewski.com).
+See the list of [contributors](https://github.com/Sylius/Payment/contributors).
\ No newline at end of file
diff --git a/src/Sylius/Component/Payment/composer.json b/src/Sylius/Component/Payment/composer.json
new file mode 100644
index 0000000000..13889a8e71
--- /dev/null
+++ b/src/Sylius/Component/Payment/composer.json
@@ -0,0 +1,42 @@
+{
+ "name": "sylius/payment",
+ "type": "library",
+ "description": "Flexible payments system for PHP e-commerce applications.",
+ "keywords": ["payments", "payment", "shop", "webshop", "ecommerce"],
+ "homepage": "http://sylius.org",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Paweł Jędrzejewski",
+ "homepage": "http://pjedrzejewski.com"
+ },
+ {
+ "name": "Sylius project",
+ "homepage": "http://sylius.org"
+ },
+ {
+ "name": "Community contributions",
+ "homepage": "http://github.com/Sylius/Sylius/contributors"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.3",
+
+ "sylius/resource": "1.0.*@dev"
+ },
+ "require-dev": {
+ "phpspec/phpspec": "2.0.*@dev"
+ },
+ "config": {
+ "bin-dir": "bin"
+ },
+ "autoload": {
+ "psr-0": { "Sylius\\Component\\Payment\\": "" }
+ },
+ "target-dir": "Sylius/Component/Payment",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ }
+}
diff --git a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Model/CreditCardSpec.php b/src/Sylius/Component/Payment/spec/Sylius/Component/Payment/Model/CreditCardSpec.php
similarity index 89%
rename from src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Model/CreditCardSpec.php
rename to src/Sylius/Component/Payment/spec/Sylius/Component/Payment/Model/CreditCardSpec.php
index bf4207ffb7..864ff6548a 100644
--- a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Model/CreditCardSpec.php
+++ b/src/Sylius/Component/Payment/spec/Sylius/Component/Payment/Model/CreditCardSpec.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace spec\Sylius\Bundle\PaymentsBundle\Model;
+namespace spec\Sylius\Component\Payment\Model;
use PhpSpec\ObjectBehavior;
@@ -20,17 +20,17 @@ class CreditCardSpec extends ObjectBehavior
{
function it_is_initializable()
{
- $this->shouldHaveType('Sylius\Bundle\PaymentsBundle\Model\CreditCard');
+ $this->shouldHaveType('Sylius\Component\Payment\Model\CreditCard');
}
function it_implements_Sylius_credit_card_interface()
{
- $this->shouldImplement('Sylius\Bundle\PaymentsBundle\Model\CreditCardInterface');
+ $this->shouldImplement('Sylius\Component\Payment\Model\CreditCardInterface');
}
function it_implements_Sylius_payment_source_interface()
{
- $this->shouldImplement('Sylius\Bundle\PaymentsBundle\Model\PaymentSourceInterface');
+ $this->shouldImplement('Sylius\Component\Payment\Model\PaymentSourceInterface');
}
function it_has_no_id_by_default()
diff --git a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Model/PaymentMethodSpec.php b/src/Sylius/Component/Payment/spec/Sylius/Component/Payment/Model/PaymentMethodSpec.php
similarity index 90%
rename from src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Model/PaymentMethodSpec.php
rename to src/Sylius/Component/Payment/spec/Sylius/Component/Payment/Model/PaymentMethodSpec.php
index 2a9b93044d..010d4351e0 100644
--- a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Model/PaymentMethodSpec.php
+++ b/src/Sylius/Component/Payment/spec/Sylius/Component/Payment/Model/PaymentMethodSpec.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace spec\Sylius\Bundle\PaymentsBundle\Model;
+namespace spec\Sylius\Component\Payment\Model;
use PhpSpec\ObjectBehavior;
@@ -20,12 +20,12 @@ class PaymentMethodSpec extends ObjectBehavior
{
function it_is_initializable()
{
- $this->shouldHaveType('Sylius\Bundle\PaymentsBundle\Model\PaymentMethod');
+ $this->shouldHaveType('Sylius\Component\Payment\Model\PaymentMethod');
}
function it_implements_Sylius_payment_method_interface()
{
- $this->shouldImplement('Sylius\Bundle\PaymentsBundle\Model\PaymentMethodInterface');
+ $this->shouldImplement('Sylius\Component\Payment\Model\PaymentMethodInterface');
}
function it_has_no_id_by_default()
diff --git a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Model/PaymentSpec.php b/src/Sylius/Component/Payment/spec/Sylius/Component/Payment/Model/PaymentSpec.php
similarity index 85%
rename from src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Model/PaymentSpec.php
rename to src/Sylius/Component/Payment/spec/Sylius/Component/Payment/Model/PaymentSpec.php
index 98b4f3ee85..fb1669e330 100644
--- a/src/Sylius/Bundle/PaymentsBundle/spec/Sylius/Bundle/PaymentsBundle/Model/PaymentSpec.php
+++ b/src/Sylius/Component/Payment/spec/Sylius/Component/Payment/Model/PaymentSpec.php
@@ -9,13 +9,12 @@
* file that was distributed with this source code.
*/
-namespace spec\Sylius\Bundle\PaymentsBundle\Model;
+namespace spec\Sylius\Component\Payment\Model;
use PhpSpec\ObjectBehavior;
-use Sylius\Bundle\PaymentsBundle\Model\CreditCardInterface;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentInterface;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentLogInterface;
-use Sylius\Bundle\PaymentsBundle\Model\PaymentMethodInterface;
+use Sylius\Component\Payment\Model\CreditCardInterface;
+use Sylius\Component\Payment\Model\PaymentInterface;
+use Sylius\Component\Payment\Model\PaymentMethodInterface;
/**
* @author Paweł Jędrzejewski
@@ -24,12 +23,12 @@ class PaymentSpec extends ObjectBehavior
{
function it_is_initializable()
{
- $this->shouldHaveType('Sylius\Bundle\PaymentsBundle\Model\Payment');
+ $this->shouldHaveType('Sylius\Component\Payment\Model\Payment');
}
function it_implements_Sylius_payment_interface()
{
- $this->shouldImplement('Sylius\Bundle\PaymentsBundle\Model\PaymentInterface');
+ $this->shouldImplement('Sylius\Component\Payment\Model\PaymentInterface');
}
function it_has_no_id_by_default()