[FIX] website_sale: improve polling at confirmation page

At this step, Order is not always confirmed
This commit is contained in:
Jeremy Kersten
2017-11-29 16:39:30 +01:00
parent ee1d83dc3c
commit 52bf41e7f2
2 changed files with 8 additions and 3 deletions
@@ -16,8 +16,13 @@ $(document).ready(function () {
return ajax.jsonRpc('/shop/payment/get_status/' + order_id, 'call', {
}).then(function (result) {
_poll_nbr += 1;
if(result.recall && _poll_nbr <= 5){
setTimeout(function () { payment_transaction_poll_status(); }, 1000);
if(result.recall) {
if (_poll_nbr < 20){
setTimeout(function () { payment_transaction_poll_status(); }, Math.ceil(_poll_nbr / 3) * 1000);
}
else {
result.message = "<i class='fa fa-warning' />";
}
}
$('div.oe_website_sale_tx_status').html(result.message);
});
+1 -1
View File
@@ -1431,7 +1431,7 @@
<t t-call="website_sale.wizard_checkout">
<t t-set="step" t-value="50" />
</t>
<h1 class="mb32">Order <em t-field="order.name" /> Confirmed</h1>
<h1 class="mb32">Order <em t-field="order.name" /></h1>
<div class="row">
<div class="col-lg-8 col-sm-9">
<div class="thanks_msg">