paypal donate script

Results 1 to 3 of 3
  1. #1
    Account Upgraded | Title Enabled! rhys918 is offline
    MemberRank
    Apr 2009 Join Date
    EnglandLocation
    377Posts

    paypal donate script

    when someone donates it sends the payment to my account but ive gotta accept the payment so that means somone can cancel it then they get free lg coins how do i fixthis?


    PHP Code:
    <?
    SetTitle
    ("Last GunZ Donate Page");
    if(
    $_SESSION['AID'] == "")
    {
    alertbox("Log in first...","index.php");
        die();
    }
    ?>
    <script language="JavaScript">
    /*
    SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
    http://www.editeurjavascript.com
    */
    function ChangeUrl(formulaire)
        {
        if (formulaire.ListeUrl.selectedIndex != 0)
            {
            location.href = formulaire.ListeUrl.options[formulaire.ListeUrl.selectedIndex].value;
             }
        else 
            {
            alert('Veuillez choisir une destination.');
            }
        }
    </script>
    <script type="text/javascript">

        function updateForm()
        {
            var donation = document.donation.amount.value;
            var coins = donation*10
            document.getElementById("coins").innerHTML = coins;

            document.donation.item_name.value = coins + " LG Coins";
            document.donation.item_number.value = coins;
        }

    </script>
    <table width="490" border="0" bgcolor="#151515" align="center" class="login4">
      <tr>
        <td width="135" align="center" class="estilo2"></td>
        <td width="345" height="5" align="center" class="estilo2"></td>
      </tr>
      <tr>
        <td colspan="2" align="center" class="estilo2">Donate to Last GunZ </td>
      </tr>
      <tr>
        <td class="estilo2" align="center"></td>
        <td class="estilo2" align="center" height="20"></td>
      </tr>
      <tr>
        <td class="estilo1" align="center"><img src="img/bn_paypal.png" width="99" height="91"></td>
        <td class="estilo1" align="center" height="20"> The payment service PayPal is widely recognized to be quickly and safely. PayPal offers the use of the most popular for its credit card transactions. </td>
      </tr>
      <tr>
        <td class="estilo1" align="center" height="20"></td>
        <td class="estilo1" align="center"></td>
      </tr>
      <tr>
        <td height="20" colspan="2" align="center" class="estilo1"><form name="donation" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                                                    <input type="hidden" name="cmd" value="_xclick" />
                                                    <input type="hidden" name="business" value="supportatlastgunzteam@live.com" />
                                                    <input type="hidden" name="lc" value="US">
                                                    <input type="hidden" name="currency_code" value="USD" />
                                                    <input type="hidden" name="no_note" value="1" />
                                                    <input type="hidden" name="no_shipping" value="1" />
                                                    <input type="hidden" name="tax" value="0.00" />
                                                    <input type="hidden" name="bn" value="PP-BuyNowBF" />
                                                    <input type="hidden" name="return" value="http://lastgunz.com/index.php?rg=ipn" />
                                                    <input type="hidden" name="cancel_return" value="http://lastgunz.com/" />
                                                    <input type="hidden" name="notify_url" value="http://lastgunz.com/index.php?rg=ipn" />
                                                    <input type="hidden" name="rm" value="2" />

                                                    Donate:<br>
                                                    <select name="amount" onchange="updateForm();" class="Login">
                                                        <option value="5.00">5 USD</option>
                                                        <option value="10.00" selected>10 USD</option>
                                                        <option value="20.00">20 USD</option>
                                                        <option value="30.00">30 USD</option>
                                                        <option value="40.00">40 USD</option>
                                                        <option value="50.00">50 USD</option>
                                                        
                                                
                                                    </select>
                                                    <br /><br>
                                                    With this donation, you will get <span id="coins">25</span> LG Coins

                                                    <input type="hidden" name="item_name" value="25 LGCoins">
                                                    <input type="hidden" name="item_number" value="25">
                                                    <input type="hidden" name="custom" value="<?php echo $_SESSION['AID']; ?>">
                                                    <script type="text/javascript">
                                                        updateForm();
                                                    </script><br><br>
                                                    <input name="submit" type="submit" id="submit" value="Donate now" class="login">
        </form></td>
      </tr>
      <tr>
        <td class="estilo2" align="center"></td>
        <td class="estilo2" align="center" height="5"></td>
      </tr>
    </table>


  2. #2
    Pee Aitch Pee Dave is offline
    MemberRank
    Mar 2011 Join Date
    The NetherlandsLocation
    722Posts

    Re: paypal donate script

    Maybe you need to add:
    PHP Code:
    <input type="hidden" value="instant" name="payment_type"/> 

  3. #3
    Account Upgraded | Title Enabled! Mitcho is offline
    MemberRank
    Dec 2011 Join Date
    AdminCPLocation
    339Posts

    Re: paypal donate script

    <?
    $user="donations";
    $password="********";
    $database="********";
    mysql_connect(localhost,$user,$password);
    @mysql_select_db($database) or die( "Unable to select database");
    mysql_query($query);
    $query = "INSERT INTO donations VALUES ('','$first_name','$last_name','$payer_email','$settle_amount')";
    echo "<H3>Thank you very much for your donation $first_name!</h3><br><br><b>You are now on the donor's list!</b>";
    mysql_close();
    ?>
    --// Something to keep in mind about the above script, paypal, when a payment goes through, sends some variables to the return page, the ones I am using are last_name, first_name, payer_email, and settle_amount)//--

    Did you add this script also ingame? Aka DB.



Advertisement