Skip to content

Commit

Permalink
feature #87 added button to redirect to paypal payment method wizard …
Browse files Browse the repository at this point in the history
…(SirDomin)

This PR was merged into the 1.0-dev branch.

Discussion
----------

![image](https://user-images.githubusercontent.com/22825722/92582437-3c0ebd00-f291-11ea-80c6-e70e1cc0a12c.png)


Commits
-------

51b379c added button to redirect to paypal payment method wizard
579d0ee pr-fix
  • Loading branch information
Zales0123 authored Sep 10, 2020
2 parents 3778c59 + 579d0ee commit 7b593e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Resources/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ sylius_grid:
templates:
action:
download_report: "@SyliusPayPalPlugin/Grid/downloadReport.html.twig"
enable_pay_pal: "@SyliusPayPalPlugin/Grid/enablePayPal.html.twig"
grids:
sylius_admin_payment_method:
actions:
Expand All @@ -42,6 +43,9 @@ sylius_grid:
route: sylius_paypal_plugin_admin_download_payouts_report
parameters:
id: resource.id
main:
enable_pay_pal:
type: enable_pay_pal

sylius_ui:
events:
Expand Down
1 change: 1 addition & 0 deletions src/Resources/translations/messages.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ sylius:
client_id: 'Client ID'
client_secret: 'Client Secret'
different_amount: 'This is the authorized price. As you have modified the order after authorization, you will pay the amount displayed as Total'
enable_paypal: 'Enable PayPal'
label: 'PayPal'
report: 'Report'
sftp_username: 'SFTP Username'
Expand Down
7 changes: 7 additions & 0 deletions src/Resources/views/Grid/enablePayPal.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% import '@SyliusUi/Macro/buttons.html.twig' as buttons %}

{% set path = path('sylius_admin_payment_method_create', {'factory': 'sylius.pay_pal'}) %}

<div class="ui buttons icon top floating button">
{{ buttons.default(path, 'sylius.pay_pal.enable_paypal'|trans , null, null) }}
</div>

0 comments on commit 7b593e9

Please sign in to comment.