Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYL-3329 Install PayPalPlugin #958

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,22 @@ jobs:

-
name: Run managing catalog promotion scenarios
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&@managing_catalog_promotions"
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@mink:chromedriver&&~@todo&&~@cli&&@managing_catalog_promotions"

-
name: Run managing exchange rates scenarios
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&@managing_exchange_rates"
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@mink:chromedriver&&~@todo&&~@cli&&@managing_exchange_rates"

-
name: Run non-JS Behat (without managing catalog promotion scenarios and exchange rates)
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@managing_catalog_promotions&&~@managing_exchange_rates"
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@mink:chromedriver&&~@todo&&~@cli&&~@managing_catalog_promotions&&~@managing_exchange_rates"

-
name: Run JS Behat
name: Run JS Behat (Chromedriver)
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli" --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli" --rerun

-
name: Run JS Behat (Panther)
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --rerun

-
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
],
"require": {
"php": "^8.1",
"sylius/paypal-plugin": "dev-master",
"sylius/sylius": "1.13.x-dev",
"symfony/dotenv": "^5.4 || ^6.4",
"symfony/runtime": "^5.4 || ^6.4",
"symfony/flex": "^2.4"
"symfony/flex": "^2.4",
"symfony/runtime": "^5.4 || ^6.4"
},
"require-dev": {
"behat/behat": "^3.7",
Expand Down Expand Up @@ -76,7 +77,8 @@
"dealerdirect/phpcodesniffer-composer-installer": false,
"phpstan/extension-installer": false,
"symfony/thanks": false,
"symfony/runtime": true
"symfony/runtime": true,
"php-http/discovery": true
}
},
"extra": {
Expand Down
2 changes: 1 addition & 1 deletion config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true],
SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true],
// Sylius\PayPalPlugin\SyliusPayPalPlugin::class => ['all' => true], // Restore before Sylius 1.13 release
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Sylius\PayPalPlugin\SyliusPayPalPlugin::class => ['all' => true],
];
3 changes: 1 addition & 2 deletions config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ imports:

- { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }

# Restore before Sylius 1.13 release
# - { resource: "@SyliusPayPalPlugin/Resources/config/config.yaml" }
- { resource: "@SyliusPayPalPlugin/Resources/config/config.yaml" }
- { resource: "../parameters.yaml" }

parameters:
Expand Down
5 changes: 2 additions & 3 deletions config/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Restore before Sylius 1.13 release
#sylius_paypal_webhook:
# resource: "@SyliusPayPalPlugin/Resources/config/webhook_routing.yaml"
sylius_paypal_webhook:
resource: "@SyliusPayPalPlugin/Resources/config/webhook_routing.yaml"
7 changes: 3 additions & 4 deletions config/routes/sylius_admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ sylius_admin:
resource: "@SyliusAdminBundle/Resources/config/routing.yml"
prefix: '/%sylius_admin.path_name%'

# Restore before Sylius 1.13 release
#sylius_paypal_admin:
# resource: "@SyliusPayPalPlugin/Resources/config/admin_routing.yml"
# prefix: '/%sylius_admin.path_name%'
sylius_paypal_admin:
resource: "@SyliusPayPalPlugin/Resources/config/admin_routing.yml"
prefix: '/%sylius_admin.path_name%'
11 changes: 5 additions & 6 deletions config/routes/sylius_shop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ sylius_shop_default_locale:
defaults:
_controller: sylius.controller.shop.locale_switch::switchAction

# Restore before Sylius 1.13 release
#sylius_paypal:
# resource: "@SyliusPayPalPlugin/Resources/config/shop_routing.yaml"
# prefix: /{_locale}
# requirements:
# _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$
sylius_paypal:
resource: "@SyliusPayPalPlugin/Resources/config/shop_routing.yaml"
prefix: /{_locale}
requirements:
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$

# see https://web.dev/change-password-url/
sylius_shop_request_password_reset_token_redirect:
Expand Down
15 changes: 15 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,18 @@
"phar-io/version": {
"version": "1.0.1"
},
"php-http/discovery": {
"version": "1.19",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.18",
"ref": "f45b5dd173a27873ab19f5e3180b2f661c21de02"
},
"files": [
"config/packages/http_discovery.yaml"
]
},
"php-http/guzzle6-adapter": {
"version": "v1.1.1"
},
Expand Down Expand Up @@ -533,6 +545,9 @@
"sylius/mailer-bundle": {
"version": "v1.4.4"
},
"sylius/paypal-plugin": {
"version": "dev-support-sylius-dev-version"
},
"sylius/registry": {
"version": "v1.4.1"
},
Expand Down
23 changes: 11 additions & 12 deletions templates/bundles/SyliusAdminBundle/Order/Show/_payment.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@
</form>
</div>
{% endif %}
{# Restore before Sylius 1.13 release #}
{# {% if#}
{# payment.method.gatewayConfig.factoryName == 'sylius.pay_pal' and#}
{# payment.state == 'refunded'#}
{# %}#}
{# <div class="ui icon mini message">#}
{# <i class="paypal icon"></i>#}
{# <div class="content">#}
{# <p>{{ 'sylius.pay_pal.tender_type'|trans }}</p>#}
{# </div>#}
{# </div>#}
{# {% endif %}#}
{% if
payment.method.gatewayConfig.factoryName == 'sylius.pay_pal' and
payment.state == 'refunded'
%}
<div class="ui icon mini message">
<i class="paypal icon"></i>
<div class="content">
<p>{{ 'sylius.pay_pal.tender_type'|trans }}</p>
</div>
</div>
{% endif %}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
<p>{{ method.description }}</p>
</div>
{% endif %}
{# Restore before Sylius 1.13 release #}
{# {% if method.gatewayConfig.factoryName == 'sylius.pay_pal' %}#}
{# {{ render(controller('Sylius\\PayPalPlugin\\Controller\\PayPalButtonsController::renderPaymentPageButtonsAction', {'orderId': order.id})) }}#}
{# {% endif %}#}
{% if method.gatewayConfig.factoryName == 'sylius.pay_pal' %}
{{ render(controller('Sylius\\PayPalPlugin\\Controller\\PayPalButtonsController::renderPaymentPageButtonsAction', {'orderId': order.id})) }}
{% endif %}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
{% endif %}
</div>
</div>
{# Restore before Sylius 1.13 release #}
{#{% if sylius_is_billing_address_missing(order) %}#}
{#<div class="ui icon message">#}
{# <i class="address card icon"></i>#}
{# <div class="content">#}
{# <div class="header">{{ 'sylius.pay_pal.missing_billing_address_header'|trans }}</div>#}
{# <p>{{ 'sylius.pay_pal.missing_billing_address_content'|trans }}</p>#}
{# </div>#}
{#</div>#}
{#{% endif %}#}
{% if sylius_is_billing_address_missing(order) %}
<div class="ui icon message">
<i class="address card icon"></i>
<div class="content">
<div class="header">{{ 'sylius.pay_pal.missing_billing_address_header'|trans }}</div>
<p>{{ 'sylius.pay_pal.missing_billing_address_content'|trans }}</p>
</div>
</div>
{% endif %}
Loading