Инструменты страницы



Additional requirements to payment page

Passing bonus point amount in order registration request

In the event that the store uses its own payment page, then in addition to complying with the standard requirements described in the section «Payment page design», the page must provide the following element to display information about payment with bonuses:

  • Element with id=«bonusBlock», which will be shown or hidden depending on whether the order includes payment with points and whether payment with points is allowed for the store. It is recommended to make the element hidden by default (see example below).
  • Inside the «bonusBlock» element there must be an element with id=«bonusAmount», which will display the amount of payment in points. Example:

<div id="bonusBlock" style="display: none">Bonus amount:<span id="bonusAmount"> </span> </div>

Sample code on the page:

<script type="text/javascript">
 $(document).payment({
 .......
 updatePage: function(data) {
 .......
 if (typeof data'bonusAmount' != 'undefined' && data'bonusAmount' > 0) {
 $("#bonusAmount").text(data'bonusAmount' / 100);
 $("#bonusBlock").show();
 }
 }
 });
 </script>

Entering bonus point amount on payment page

In the event that the store uses its own payment page, then in addition to complying with the standard requirements described in the «Payment page design» section, the following block must be placed on the page to select the number of bonuses:

<tr id="spasibo_block" style="display:none;">
            <td class="col1" colspan="2"><span class="textt">
                <div class="title"><input type="checkbox" id="spasiboAgree"> <label for="spasiboAgree">Pay with Spasibo</label> <span class="spasibo-icon"></span></div>
         
 
                <div>
                    <p class="select-bonus">Select the amount you are going to pay with Spasibo Points:</p>
                        <div class="slider-wrapper">
                            <div aria-disabled="false" class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" id="spasiboSlider"><div class="ui-slider-range ui-widget-header ui-corner-all ui-slider-range-min"></div><a class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a></div>
                            <input id="spasibo" type="text">
                            <input value="0" name="sbrf_spasibo:amount_bonus" id="sbrf_spasibo" type="hidden">
                        <span id="spasibo-validation"></span>
                    </div>
                    <div class="spasibo-info"> Bonuses "Spasibo" can be paid up to 99% of the order amount. The remaining percentage of the amount is paid by non-cash payment from a bank card, while 1 "Spasibo" bonus is equivalent to 1 ruble. </div>
                </div>