Iframe is mobile Flag

From BetgamesTV
Jump to navigation Jump to search

Is_mobile - it's an optional parameter to distinguish platform from which the bet was made.
Note: please bear in mind, that this parameter has nothing in common with Front-end part, it doesn't change UI of the iFrame in any ways.

In case you need to track bets placed via mobile platform, you have to add to mobile version of your website "is_mobile" parameter with a value "1" into iFrame JS launch code. Example:

<!-- betgames.tv iframe -->
<div id="<IFRAME_HTML_CONTAINER_ID>"></div>
<script type="text/javascript">
    var clientUrl = '<IFRAME_CLIENT_SERVER>';
    var script = document.createElement('script');
 
    script.onload = function () {
        window.BetGames.setup({
            containerId: '<IFRAME_HTML_CONTAINER_ID>',
            clientUrl: clientUrl,
            apiUrl: '<BETGAMES_PRODUCTION_SERVER>',
            partnerCode: '<YOUR_PARTNER_CODE>',
            partnerToken: '<PARTNER_TOKEN>',
            language: '<LANGUAGE_CODE>',
            timezone: '<TIMEZONE_UTC>',
            oddsFormat: '<ODDS_FORMAT>',
            homeUrl: '<HOME_BUTTON_URL>',
            defaultGame: '<DEFAULT_GAME_ID>',
            defaultPage: '<DEFAULT_PAGE_NAME>',
            isMobile: '<IS_MOBILE_BETTING>',
            onlyGUI: '<ONLY_GUI_MODE>',
            defaultGUI: '<DEFAULT_GUI_MODE>',
        });
    };
 
    script.type = 'text/javascript';
    script.src = clientUrl + '/public/betgames.js' + '?' + Date.now();
 
    document.head.appendChild(script);
</script>
 <!-- // -->

Note: this parameter isn't being used for desktop platform.

It will appear in: transaction_bet_payin, transaction_bet_subscription_payin, transaction_bet_combination_payin XML requests. Example:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <method>transaction_bet_payin</method>
    <token>c2696fe0-eba8-012f-596c-528c3f9e4820</token>
    <signature>a91c39b7028bde988d1a6858fafd545a</signature>
    <time>1423127617</time>
    <params>
        <amount>1234</amount>
        <currency>eur</currency>
        <bet_id>123456</bet_id>
        <transaction_id>246912</transaction_id>
        <retrying>0</retrying>
        <bet>Selected ball will be dropped with No. 1,...,42(1, 3, 10)</bet>
        <odd>5.70</odd>
        <bet_time>2015-02-05 09:13:37</bet_time>
        <game>1</game>
        <draw_code>71304050073</draw_code>
        <draw_time>2015-02-05 09:15:00</draw_time>
        <is_mobile>1</is_mobile>
    </params>
</root>

Important: If you use is_mobile parameter, please make sure, that it's included in a signature MD5 calculation.

  • Signature calculation string:
    methodtransaction_bet_payintokenc2696fe0-eba8-012f-596c-528c3f9e4820time1423127617amount1234currencyeurbet_id123456transaction_id246912retrying0betSelected ball will be dropped with No. 1,...,42(1, 3, 10)odd5.70bet_time2015-02-05 09:13:37game1draw_code71304050073draw_time2015-02-05 09:15:00is_mobile11JD4U-S7XB6-GKITA-DQXHP
  • Result after MD5 calculation:
    a91c39b7028bde988d1a6858fafd545a