Skip to content
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
16 changes: 10 additions & 6 deletions config/twig_hooks/shop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,31 @@ sylius_twig_hooks:
template: "@PayPlugSyliusPayPlugPlugin/Account/SavedCards/Index/_subcontent.html.twig"
priority: 10


# TODO: check if this is possible only on select_payment page
'sylius_shop.checkout#stylesheets':
select_payment_css:
template: '@PayPlugSyliusPayPlugPlugin/stylesheets/select_payment_css.html.twig'

'sylius_shop.order#stylesheets':
select_payment_css:
template: '@PayPlugSyliusPayPlugPlugin/stylesheets/select_payment_css.html.twig'

'sylius_shop.shared.form.select_payment.payment.choice.details':
payplug_choice:
template: '@PayPlugSyliusPayPlugPlugin/SyliusShopBundle/Checkout/SelectPayment/_choice.html.twig'

'sylius_shop.checkout.select_payment.content.form.select_payment.payment.choice.details#payplug':
'sylius_shop.shared.form.select_payment.payment.choice.details#payplug':
payplug_block:
template: '@PayPlugSyliusPayPlugPlugin/SyliusShopBundle/Checkout/SelectPayment/_payplug_block.html.twig'
'sylius_shop.checkout.select_payment.content.form.select_payment.payment.choice.details#payplug_oney':
'sylius_shop.shared.form.select_payment.payment.choice.details#payplug_oney':
payplug_oney_block:
template: '@PayPlugSyliusPayPlugPlugin/SyliusShopBundle/Checkout/SelectPayment/_payplug_oney_block.html.twig'
'sylius_shop.checkout.select_payment.content.form.select_payment.payment.choice.details#payplug_bancontact':
'sylius_shop.shared.form.select_payment.payment.choice.details#payplug_bancontact':
payplug_bancontact_block:
template: '@PayPlugSyliusPayPlugPlugin/SyliusShopBundle/Checkout/SelectPayment/_payplug_bancontact_block.html.twig'
'sylius_shop.checkout.select_payment.content.form.select_payment.payment.choice.details#payplug_apple_pay':
'sylius_shop.shared.form.select_payment.payment.choice.details#payplug_apple_pay':
payplug_apple_pay_block:
template: '@PayPlugSyliusPayPlugPlugin/SyliusShopBundle/Checkout/SelectPayment/_payplug_apple_pay_block.html.twig'
'sylius_shop.checkout.select_payment.content.form.select_payment.payment.choice.details#payplug_american_express':
'sylius_shop.shared.form.select_payment.payment.choice.details#payplug_american_express':
payplug_american_express_block:
template: '@PayPlugSyliusPayPlugPlugin/SyliusShopBundle/Checkout/SelectPayment/_payplug_american_express_block.html.twig'
1 change: 1 addition & 0 deletions src/Form/Extension/PaymentTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function buildForm(
$builder
->add('oney_payment_choice', ChoiceType::class, [
'mapped' => false,
'block_prefix' => 'oney_payment_choice',
'choices' => $this->oneySupportedPaymentChoiceProvider->getSupportedPaymentChoices(true),
])
->add('payplug_card_choice', TextType::class, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,5 @@
{% set applePayFactoryName = constant('PayPlug\\SyliusPayPlugPlugin\\Gateway\\ApplePayGatewayFactory::FACTORY_NAME') %}
{% set americanExpressFactoryName = constant('PayPlug\\SyliusPayPlugPlugin\\Gateway\\AmericanExpressGatewayFactory::FACTORY_NAME') %}

{% if factoryName == oneyFactoryName %}
{% hook '#payplug_oney' %}
{% elseif factoryName == payplugFactoryName %}
{% hook '#payplug' %}
{% elseif factoryName == bancontactFactoryName %}
{% hook '#payplug_bancontact' %}
{% elseif factoryName == applePayFactoryName %}
{% hook '#payplug_apple_pay' %}
{% elseif factoryName == americanExpressFactoryName %}
{% hook '#payplug_american_express' %}
{% endif %}
{% hook '#' ~ factoryName %}

2 changes: 1 addition & 1 deletion templates/form/integrated.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
{% endif %}

<div class="payplugIntegratedPayment__container">
<button id="paid" class="ui large primary button" type="button">
<button id="paid" class="btn btn-primary" type="button">
{{ 'payplug_sylius_payplug_plugin.ui.integrated_payment.place_order.label'|trans }}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% block _sylius_shop_checkout_select_payment_payments_entry_oney_payment_choice_row %}
{% block oney_payment_choice_row %}
{% set data = oney_simulation_data() %}
{% import "@SyliusShop/shared/macro/money.html.twig" as money %}

Expand Down
Loading