• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Buy Points Bonus

dex93

New Member
Joined
May 31, 2015
Messages
57
Reaction score
3
Hiho,
what's wrong?
ZNOTE 1.5
OTX 2.X.S
http://dexteria.pl/buypoints.php
bin1.jpg


I tried everything -.-
how to set this correctly?
 
Last edited:
Thanks mate but nobody answered how to fix this.
I used "SEARCH" before I added post here.
if you found solution show me a topic .
 
The issues probably lies in your configuration file (config.php). You have calculated the bonus in a bad mannor, which makes the calculation go bananas and show minus bonuses.
 
The issues probably lies in your configuration file (config.php). You have calculated the bonus in a bad mannor, which makes the calculation go bananas and show minus bonuses.

PHP:
    $config['paypal'] = array(
        'enabled' => true,
        'email' => '[email protected]', // Example: [email protected]
        'currency' => 'PLN',
        'points_per_currency' => 5, // 1 currency = ? points? [ONLY used to calculate bonuses]    // I tried all numbers here and always are monkeys with bananas :/
        'success' => "http://".$_SERVER['HTTP_HOST']."/success.php",
        'failed' => "http://".$_SERVER['HTTP_HOST']."/failed.php",
        'ipn' => "http://".$_SERVER['HTTP_HOST']."/ipn.php",
        'showBonus' => true,
    );

I meant 5. Tbh. No idea why wrote 6 lol
Ahh okey, fixed.

I removed bonus from Znote and I added info about bonus added manual by ticket but easier and faster for players is auto bonus :<
 
Did you mean that?

PHP:
    // Configure the "buy now" buttons prices, first write price, then how many points you get.
    // Giving some bonus points for higher donations will tempt users to donate more.
    $config['paypal_prices'] = array(
    //    price => points,
        30 => 30, // 0 bonus
        50 => 60, // 10% bonus
        70 => 80, // +20% bonus
        100 => 110, // +30% bonus
        250 => 250, // +50% bonus
      
    );

It's piece of code from buypoints.php
PHP:
<h1>Buy Points</h1>
<h2>Buy points using Paypal:</h2>
<table id="buypointsTable" class="table table-striped table-hover">
    <tr class="yellow">
        <th>Price:</th>
        <th>Points:</th>
        <?php if ($paypal['showBonus']) { ?>

        <?php } ?>
        <th>Action:</th>
    </tr>
        <?php
        foreach ($prices as $price => $points) {
        echo '<tr class="special">';
        echo '<td>'. $price .'('. $paypal['currency'] .')</td>';
        echo '<td>'. $points .'</td>';
   
        ?>
        <td>
            <form action="https://www.paypal.com/cgi-bin/webscr" method="POST">
                <input type="hidden" name="cmd" value="_xclick">
                <input type="hidden" name="business" value="<?php echo $paypal['email']; ?>">
                <input type="hidden" name="item_name" value="<?php echo $points .' shop points on '. $config['site_title']; ?>">
                <input type="hidden" name="item_number" value="1">
                <input type="hidden" name="amount" value="<?php echo $price; ?>">
                <input type="hidden" name="no_shipping" value="1">
                <input type="hidden" name="no_note" value="1">
                <input type="hidden" name="currency_code" value="<?php echo $paypal['currency']; ?>">
                <input type="hidden" name="lc" value="GB">
                <input type="hidden" name="bn" value="PP-BuyNowBF">
                <input type="hidden" name="return" value="<?php echo $paypal['success']; ?>">
                <input type="hidden" name="cancel_return" value="<?php echo $paypal['failed']; ?>">
                <input type="hidden" name="rm" value="2">
                <input type="hidden" name="notify_url" value="<?php echo $paypal['ipn']; ?>" />
                <input type="hidden" name="custom" value="<?php echo (int)$session_user_id; ?>">
                <input type="submit" value="  PURCHASE  ">
            </form>
        </td>
        <?php
        echo '</tr>';
        }
        ?>
</table></br>
<h1>Bonus:</h1>
<h2>    30 PLN  No bonus</br>
        50 PLN +10% Bonus</br>
        70 PLN +20% Bonus</br>
        100 PLN +30% Bonus</br>
        250 PLN +50% Bonus</br>
        To get bonus open a ticket <a href="http://dexteria.pl/helpdesk.php">here.</a>
</h2>
</center>


I removed only part of code about bonus because players were confused.
 
Back
Top