-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
2,122 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'%commerce_weavers_sylius_tpay.model.credit_card.class%': | ||
collectionOperations: | ||
shop_get: | ||
method: 'GET' | ||
path: /shop/credit-cards | ||
normalization_context: | ||
groups: | ||
- 'commerce_weavers_sylius_tpay:shop:credit_card:index' | ||
itemOperations: | ||
shop_get: | ||
method: 'GET' | ||
path: /shop/credit-cards/{id} | ||
normalization_context: | ||
groups: | ||
- 'commerce_weavers_sylius_tpay:shop:credit_card:show' | ||
shop_delete: | ||
method: 'DELETE' | ||
path: /shop/credit-cards/{id} | ||
properties: | ||
id: | ||
identifier: true | ||
tail: | ||
writable: false | ||
brand: | ||
writable: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<doctrine-mapping | ||
xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd" | ||
> | ||
<mapped-superclass name="CommerceWeavers\SyliusTpayPlugin\Entity\CreditCard" table="cw_sylius_tpay_credt_card"> | ||
<id name="id" column="id" /> | ||
|
||
<field name="token" column="token" /> | ||
<field name="brand" column="brand" /> | ||
<field name="tail" column="tail" /> | ||
|
||
<field name="expirationDate" column="expiration_date" type="datetime" nullable="true" /> | ||
|
||
<many-to-one field="customer" target-entity="Sylius\Component\Core\Model\CustomerInterface"> | ||
<join-column name="customer_id" nullable="false" on-delete="CASCADE" /> | ||
</many-to-one> | ||
|
||
<many-to-one field="channel" target-entity="Sylius\Component\Core\Model\ChannelInterface"> | ||
<join-column name="channel_id" nullable="false" on-delete="CASCADE" /> | ||
</many-to-one> | ||
</mapped-superclass> | ||
</doctrine-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
sylius_grid: | ||
grids: | ||
commerce_weavers_sylius_tpay_shop_account_credit_card: | ||
driver: | ||
name: doctrine/orm | ||
options: | ||
class: "%commerce_weavers_sylius_tpay.model.credit_card.class%" | ||
repository: | ||
method: createByCustomerListQueryBuilder | ||
arguments: | ||
- "expr:service('sylius.context.customer').getCustomer()" | ||
- "expr:service('sylius.context.channel').getChannel()" | ||
sorting: | ||
expirationDate: desc | ||
fields: | ||
brand: | ||
type: string | ||
label: commerce_weavers_sylius_tpay.shop.credit_card.brand | ||
sortable: ~ | ||
tail: | ||
type: string | ||
label: commerce_weavers_sylius_tpay.shop.credit_card.tail | ||
sortable: ~ | ||
expirationDate: | ||
type: datetime | ||
label: commerce_weavers_sylius_tpay.shop.credit_card.expiration_date | ||
sortable: ~ | ||
options: | ||
format: m-Y | ||
actions: | ||
item: | ||
delete: | ||
type: delete | ||
label: sylius.ui.delete | ||
options: | ||
link: | ||
route: !php/const CommerceWeavers\SyliusTpayPlugin\Routing::SHOP_ACCOUNT_CREDIT_CARD_DELETE | ||
parameters: | ||
id: resource.id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping https://symfony.com/schema/dic/serializer-mapping/serializer-mapping-1.0.xsd" | ||
> | ||
<class name="CommerceWeavers\SyliusTpayPlugin\Entity\CreditCard"> | ||
<attribute name="id"> | ||
<group>commerce_weavers_sylius_tpay:shop:credit_card:index</group> | ||
<group>commerce_weavers_sylius_tpay:shop:credit_card:show</group> | ||
</attribute> | ||
<attribute name="brand"> | ||
<group>commerce_weavers_sylius_tpay:shop:credit_card:index</group> | ||
<group>commerce_weavers_sylius_tpay:shop:credit_card:show</group> | ||
</attribute> | ||
<attribute name="tail"> | ||
<group>commerce_weavers_sylius_tpay:shop:credit_card:index</group> | ||
<group>commerce_weavers_sylius_tpay:shop:credit_card:show</group> | ||
</attribute> | ||
<attribute name="expirationDate"> | ||
<group>commerce_weavers_sylius_tpay:shop:credit_card:index</group> | ||
<group>commerce_weavers_sylius_tpay:shop:credit_card:show</group> | ||
</attribute> | ||
</class> | ||
</serializer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Symfony\Component\DependencyInjection\Loader\Configurator; | ||
|
||
use CommerceWeavers\SyliusTpayPlugin\ContextProvider\BankListContextProvider; | ||
use CommerceWeavers\SyliusTpayPlugin\ContextProvider\RegulationsUrlContextProvider; | ||
use CommerceWeavers\SyliusTpayPlugin\EventListener\AddCreditCardToAccountMenuEventListener; | ||
use Sylius\Bundle\ShopBundle\Menu\AccountMenuBuilder; | ||
|
||
return static function(ContainerConfigurator $container): void { | ||
$services = $container->services(); | ||
|
||
$services->set(AddCreditCardToAccountMenuEventListener::class) | ||
->tag('kernel.event_listener', ['event' => AccountMenuBuilder::EVENT_NAME, 'method' => '__invoke']) | ||
; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Symfony\Component\DependencyInjection\Loader\Configurator; | ||
|
||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\CreateApplePayTransactionAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\CreateBlikLevelZeroTransactionAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\CreateCardTransactionAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\CreateGooglePayTransactionAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\CreatePayByLinkTransactionAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\CreateRedirectBasedTransactionAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\CreateVisaMobileTransactionAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\GetTpayTransactionsChannelsAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\InitializeApplePayPaymentAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\NotifyAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\PayWithCardAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\Api\SaveCreditCardAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\CaptureAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\GetStatusAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\RefundAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Action\ResolveNextRouteAction; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Factory\TpayGatewayFactory; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Mapper\PayWithCardActionPayloadMapper; | ||
use CommerceWeavers\SyliusTpayPlugin\Payum\Mapper\PayWithCardActionPayloadMapperInterface; | ||
|
||
return static function(ContainerConfigurator $container): void { | ||
$services = $container->services(); | ||
$services->defaults() | ||
->public() | ||
; | ||
|
||
$services->set('commerce_weavers_sylius_tpay.payum.mapper.pay_with_card_action', PayWithCardActionPayloadMapper::class) | ||
->args([ | ||
service('commerce_weavers_sylius_tpay.repository.credit_card'), | ||
]) | ||
; | ||
}; |
Oops, something went wrong.