Skip to content

Commit

Permalink
handle error delay
Browse files Browse the repository at this point in the history
  • Loading branch information
SirDomin committed Oct 27, 2020
1 parent 88b089d commit cddc64c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if order.lastPayment.method.gatewayConfig.factoryName == 'sylius.pay_pal' and order.lastPayment.state == 'cart' %}
{{ render(controller('Sylius\\PayPalPlugin\\Controller\\PayPalButtonsController:renderPayPalPaymentAction', {'orderId': order.id})) }}
{% else %}
<button type="submit" class="ui huge primary fluid icon labeled button" {{ sylius_test_html_attribute('confirmation-button') }}>
<i class="check icon"></i> {{ 'sylius.ui.place_order'|trans }}
</button>
{% endif %}

This file was deleted.

2 changes: 1 addition & 1 deletion src/Resources/views/payWithPaypal.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
method: 'post',
headers: { 'content-type': 'application/json' },
body: JSON.stringify(err)
}).then(window.location.reload());
}).then(() => {setTimeout(window.location.reload, 300)});
},
onShippingChange: function(data, actions) {
if (!availableCountries.filter(country => country === data.shipping_address.country_code).length) {
Expand Down

0 comments on commit cddc64c

Please sign in to comment.