diff --git a/src/Resources/config/config.yaml b/src/Resources/config/config.yaml index 4cee0ebc..29d490ae 100644 --- a/src/Resources/config/config.yaml +++ b/src/Resources/config/config.yaml @@ -70,6 +70,11 @@ sylius_ui: pay_pal_payment_method: template: '@SyliusPayPalPlugin/javascripts.html.twig' priority: -100 + sylius.admin.order.show.payment_content: + blocks: + pay_pal_refunded_message: + template: '@SyliusPayPalPlugin/Admin/Order/Show/Payment/_refundedPayPal.html.twig' + priority: 7 # After "refund_transition" block. monolog: channels: ['paypal'] diff --git a/src/Resources/views/Admin/Order/Show/Payment/_refundedPayPal.html.twig b/src/Resources/views/Admin/Order/Show/Payment/_refundedPayPal.html.twig new file mode 100644 index 00000000..47abc210 --- /dev/null +++ b/src/Resources/views/Admin/Order/Show/Payment/_refundedPayPal.html.twig @@ -0,0 +1,11 @@ +{% if + payment.method.gatewayConfig.factoryName == 'sylius.pay_pal' and + payment.state == constant('Sylius\\Component\\Core\\Model\\PaymentInterface::STATE_REFUNDED') +%} +
+ +
+

{{ 'sylius.pay_pal.tender_type'|trans }}

+
+
+{% endif %} diff --git a/src/Resources/views/bundles/SyliusAdminBundle/Order/Show/_payment.html.twig b/src/Resources/views/bundles/SyliusAdminBundle/Order/Show/_payment.html.twig deleted file mode 100644 index 39165ed5..00000000 --- a/src/Resources/views/bundles/SyliusAdminBundle/Order/Show/_payment.html.twig +++ /dev/null @@ -1,46 +0,0 @@ -{% import "@SyliusAdmin/Common/Macro/money.html.twig" as money %} -{% import '@SyliusUi/Macro/labels.html.twig' as label %} - -
-
- {% include '@SyliusAdmin/Common/Label/paymentState.html.twig' with {'data': payment.state} %} -
- -
-
- {{ payment.method }} -
-
- {{ money.format(payment.amount, payment.order.currencyCode) }} -
-
- {% if sm_can(payment, 'complete', 'sylius_payment') %} -
-
- - - -
-
- {% endif %} - {% if sm_can(payment, 'refund', 'sylius_payment') %} -
-
- - - -
-
- {% endif %} - {% if - payment.method.gatewayConfig.factoryName == 'sylius.pay_pal' and - payment.state == 'refunded' - %} -
- -
-

{{ 'sylius.pay_pal.tender_type'|trans }}

-
-
- {% endif %} -