• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Guia] PayPal Puntos Automaticos

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1default [Guia] PayPal Puntos Automaticos Vie Ago 20, 2021 10:12 pm

    ioke

    ioke
    Miembro
    Miembro
    Buenas traigo el sistema de paypal de putos automaticos funcional 100%

    Paso1. en la carpeta paypal modificamos el config.lua

    Ruta---> htdocs\custom_scripts\paypal\

    config.lua

    Código:
    <?php
    $paypal_report_url = 'http://WEBSITE/paypal_report.php';
    $paypal_return_url = 'http://WEBSITE/?subtopic=shopsystem';
    $paypal_image = 'https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif';
    $paypal_payment_type = '_xclick'; // '_xclick' (Buy Now) or '_donations'

    $paypals[0]['mail'] = 'PayPal EMAIL'; // your paypal login
    $paypals[0]['name'] = '15 premium points on server WEBSITE for 5.00 EURO';
    $paypals[0]['money_amount'] = '5.00';
    $paypals[0]['money_currency'] = 'EUR'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
    $paypals[0]['premium_points'] = 15;

    $paypals[1]['mail'] = 'PayPal EMAIL'; // your paypal login
    $paypals[1]['name'] = '30 premium points on server WEBSITE for 9.00 EURO';
    $paypals[1]['money_amount'] = '9.00';
    $paypals[1]['money_currency'] = 'EUR'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
    $paypals[1]['premium_points'] = 30;

    $paypals[2]['mail'] = 'PayPal EMAIL'; // your paypal login
    $paypals[2]['name'] = '60 premium points on server WEBSITE for 15.00 EURO';
    $paypals[2]['money_amount'] = '15.00';
    $paypals[2]['money_currency'] = 'EUR'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
    $paypals[2]['premium_points'] = 60;

    $paypals[3]['mail'] = 'PayPal EMAIL'; // your paypal login
    $paypals[3]['name'] = '120 premium points on server WEBSITE for 27.00 EURO';
    $paypals[3]['money_amount'] = '27.00';
    $paypals[3]['money_currency'] = 'EUR'; // USD, EUR, more codes: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes
    $paypals[3]['premium_points'] = 120;


    Paso 2. modificar paypal_report.php

    Ruta----> htdocs\

    paypal_report.php

    Código:
    <?php
    $_GET['subtopic'] = 'paypal_report';
    $_REQUEST['subtopic'] = 'paypal_report';
    include('index.php');

    Paso 3. modificar paypal_report.php

    Ruta----> htdocs\pages\

    paypal_report.php

    Código:
    <?php
    if(!defined('INITIALIZED'))
       exit;

    require_once('./custom_scripts/paypal/config.php');
    /*
     * PayPal IPN IPs (it can change in future)
     * https://ppmts.custhelp.com/app/answers/detail/a_id/92
     * search: notify.paypal.com (IPN delivery)
    */
    if(!in_array($_SERVER['REMOTE_ADDR'], array('64.4.248.23','64.4.249.23','66.211.168.91','66.211.168.123','173.0.84.66','173.0.84.98','173.0.88.66','173.0.88.98','173.0.92.23','173.0.93.23','64.4.248.21','64.4.249.21','66.211.168.126','173.0.84.101','173.0.84.69','173.0.88.101','173.0.88.69','173.0.92.21','173.0.93.21','173.0.84.108','173.0.84.76','173.0.88.108','173.0.88.76','173.0.92.36','64.4.248.36','64.4.249.36','66.211.168.180','64.4.248.8','64.4.249.8','66.211.169.17','173.0.84.40','173.0.84.8','173.0.88.40','173.0.88.8','173.0.92.8','173.0.93.8','66.211.170.66','173.0.81.1','173.0.81.0/24','173.0.81.33','173.0.81.65','173.0.81.140','64.4.240.0/21','64.4.248.0/22','66.211.168.0/22','173.0.80.0/20','91.243.72.0/23','151.101.1.21/32','151.101.1.35/32','151.101.129.21/32','151.101.129.35/32','151.101.130.133/32','151.101.193.21/32','151.101.193.35/32','151.101.194.133/32','151.101.2.133/32','151.101.65.21/32','151.101.65.35/32','151.101.66.133/32','159.242.240.0/21','173.0.80.0/20','176.120.16.0/21','184.105.254.0/24','185.177.52.0/22','198.199.247.0/24','198.54.216.0/23','204.109.13.0/24','205.189.102.0/24','205.189.103.0/24','208.76.140.0/22','64.4.240.0/21','64.4.248.0/22','66.211.168.0/22','91.243.72.0/23')))
    {
       echo 'wrong IP';
       exit;
    }
    $receiverMail = $_REQUEST['receiver_email']; // ots admin mail
    $status = $_REQUEST['payment_status']; // payment status, we add only when is 'Completed'
    $currency = $_REQUEST['mc_currency']; // money currency, like USD or EUR
    $gross = $_REQUEST['mc_gross']; // amount of money, like: 10.00
    $payerMail = $_REQUEST['payer_email']; // player mail
    $accountID = $_REQUEST['custom']; // user account ID
    $transactionID = $_REQUEST['txn_id']; // transaction ID

    $logFile = 'custom_scripts/paypal/reported_ids/' . $transactionID . '.log';
    if(!file_exists($logFile) && $status == 'Completed')
    {
       foreach($paypals as $pay)
       {
          if($receiverMail == $pay['mail'] && $currency == $pay['money_currency'] && $gross == $pay['money_amount'])
          {
             $account = new Account($accountID);
             if($account->isLoaded())
             {
                if(file_put_contents($logFile, 'accountID:' . $accountID . ',mail:' . $payerMail . ',amount:' . $gross . ' ' . $currency . ',points:' . $pay['premium_points']) !== false)
                {
                   $account->setPremiumPoints($account->getPremiumPoints() + $pay['premium_points']);
                   $account->save();
                }
             }
             break;
          }
       }
    }
    exit;

    Paso4. modificar paypal.php

    Ruta----> htdocs\pages\

    paypal.php

    Código:
    <?php
    if(!defined('INITIALIZED'))
       exit;

    if($logged)
    {
       require_once('./custom_scripts/paypal/config.php');
       echo '<h2>Automatic PayPal shop system</h2><br><b>Here are the steps you need to make:</b><br>
       1. You need a valid creditcard <b>or</b> a PayPal account with a required amount of money.<br>
       2. Choose how many points you want buy.<br />
       3. Click on the donate/buy button.<br>
       4. Make a transaction on PayPal.<br>
       5. After the transaction points will be automatically added to your account.<br>
       6. Go to Item shop and use your points.</b><br /><br />';

       echo '<style>
       table
       {
       border-collapse:collapse;
       }
       table, td, th
       {
       border:1px solid black;
       }
       </style>';

       echo '<table cellspacing="0" style="width:100%"><tr><td colspan="2"><b>Select offer:</b></td></tr>';
       foreach($paypals as $paypal)
       {
          echo '<tr><td>Buy ' . $paypal['premium_points'] . ' premium points for ' . $paypal['money_amount'] . ' ' . $paypal['money_currency'] . '</td><td style="text-align:center"><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
          <input type="hidden" name="cmd" value="' . $paypal_payment_type . '">
          <input type="hidden" name="business" value="' . $paypal['mail'] . '">
          <input type="hidden" name="item_name" value="' . htmlspecialchars($paypal['name']) . '">
          <input type="hidden" name="custom" value="' . $account_logged->getID() . '">
          <input type="hidden" name="amount" value="' . htmlspecialchars($paypal['money_amount']) . '">
          <input type="hidden" name="currency_code" value="' . htmlspecialchars($paypal['money_currency']) . '">
          <input type="hidden" name="no_note" value="0">
          <input type="hidden" name="no_shipping" value="1">
          <input type="hidden" name="notify_url" value="' . $paypal_report_url . '">
          <input type="hidden" name="return" value="' . $paypal_return_url . '">
          <input type="hidden" name="rm" value="0">
          <input type="image" src="' . $paypal_image . '" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
          </form></td></tr>';
       }
       echo '</table>';
    }
    else
       echo 'You are not logged in. Login first to buy points.';

    Paso 5. Activar direccion en PayPal

    Ruta---> PayPal

    IMPORTANTE! Solo debeis poner la direccion web, Ejemplo: [Tienes que estar registrado y conectado para ver este vínculo] y activais el botón Recibir mensajes IPN y Guardar

    No le añadais nada mas a la direccion si no no funcionara y ya podeis disfrutar del los puntos automaticos.

    Si no os ha funcionado algo habeis hecho mal, siempre funciona si seguis los pasos, yo lo he probado en Gesior 2012 no se si sirve para otros.



    Última edición por ioke el Vie Ago 20, 2021 10:24 pm, editado 1 vez

    2 participantes
    http://baiakciteron.sytes.net

    2default Re: [Guia] PayPal Puntos Automaticos Vie Ago 20, 2021 10:14 pm

    Dfsuno

    Dfsuno
    Miembro
    Miembro
    Exelente aporte, Funciando al 100 % Gracias (y)  +Like

    2 participantes

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).