Skip to content

Commit cddc64c

Browse files
committed
handle error delay
1 parent 88b089d commit cddc64c

File tree

3 files changed

+8
-36
lines changed

3 files changed

+8
-36
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% if order.lastPayment.method.gatewayConfig.factoryName == 'sylius.pay_pal' and order.lastPayment.state == 'cart' %}
2+
{{ render(controller('Sylius\\PayPalPlugin\\Controller\\PayPalButtonsController:renderPayPalPaymentAction', {'orderId': order.id})) }}
3+
{% else %}
4+
<button type="submit" class="ui huge primary fluid icon labeled button" {{ sylius_test_html_attribute('confirmation-button') }}>
5+
<i class="check icon"></i> {{ 'sylius.ui.place_order'|trans }}
6+
</button>
7+
{% endif %}

src/Resources/views/bundles/SyliusShopBundle/Checkout/complete.html.twig

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/Resources/views/payWithPaypal.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
method: 'post',
212212
headers: { 'content-type': 'application/json' },
213213
body: JSON.stringify(err)
214-
}).then(window.location.reload());
214+
}).then(() => {setTimeout(window.location.reload, 300)});
215215
},
216216
onShippingChange: function(data, actions) {
217217
if (!availableCountries.filter(country => country === data.shipping_address.country_code).length) {

0 commit comments

Comments
 (0)