Postado Abril 8, 2017 8 anos Tengo gessior acc de los viejos e intento colocar sistema paypal pero al momento de entregar los puntos despues de haber hecho el pago no los entega :s no entiendo que esta pasando si alguien puede ayudarme le agradeceria mucho ! aqui dejo los scripts paypal.htm <?php $main_content .= ' <b>Danera donation system.</b><br><br> <b>Los pasos para comprar:</b> <br> 1. una cuenta PayPal con un saldo de [1, 5, o 10 USD] o una tarjeta de credito. <br> 2. Coloca tu Account. <br> 3. Click en el boton de donar o tarjeta de credito. <br> 4. Haz la transaaccion. <br> 5. Luego añadiras, 2, 10 o 30 puntos a tu cuenta. <br> 6. Ve a la tineda para gastar tus puntos <br> <br> <br> </b> <span style="color:red">En caso de que los puntos no se sumen automaticamente manda un correo a <b>[email protected]</b> con el account y correo desde que se hizo la transaccion.</span> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="[email protected]"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="item_name" value="Donation Points"> <b>Account name/login:</b> <input type="text" name="custom" value=""> <select name="amount"> <option value="0.01">0.01 USD</option> <option value="5.00">5 USD</option> <option value="10.00">10 USD</option> </select> <input type="hidden" name="button_subtype" value="products"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="no_shipping" value="0"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="notify_url" value="http://danera.sytes.net/ipn/ipn.php"> <input type="hidden" name="return" value="http://danera.sytes.net"> <input type="hidden" name="rm" value="0"> <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHostedGuest"> <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>'; y acá el Ipn <?php if ($_REQUEST['debug']) { ini_set("display_errors", True); error_reporting(E_ALL); } $mysql_host = 'localhost'; //Leave at localhost $mysql_user = 'root'; //DB User $mysql_pass = miclave'; //DB Pass $mysql_db = 'mibasededatos'; //DB Name $file = 'paypal.log'; //Paypal Log Name will be placed in the same location as your ipn.php file $payer_email = $_REQUEST['payer_email']; $ip = $_SERVER['REMOTE_ADDR']; $ips = array('173.0.81.1','173.0.81.33','66.211.170.66'); if(!in_array($ip, $ips)) { print "Scammer.. Your IP has been logged and forwarded to the server owner."; $hak = fopen("scammer.log", "a"); fwrite($hak, "$ip \r\n"); fclose($hak); die(0); } $time = date("F j, Y, g:i a"); $paylist = array("0.01" => 2, "5.00" => 10, "30.00"); // connect db $db = mysql_connect($mysql_host, $mysql_user, $mysql_pass); $custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom'])))); $receiver_email = $_REQUEST['receiver_email']; $payment_status = $_REQUEST['payment_status']; $mc_gross = $_REQUEST['mc_gross']; $mc_currency = $_REQUEST['mc_currency']; mysql_select_db($mysql_db, $db); if ($_REQUEST['debug']){ print $payment_status . '\n'; print (isset($paylist[$mc_gross])) ? 1 : 0 . '\n'; print $receiver_email . '\n'; print $custom . '\n'; } if ($payment_status == "Completed" && $receiver_email == "[email protected]" && isset($paylist[$mc_gross]) && $mc_currency == "USD") { $qry2 = "UPDATE accounts SET premium_points = premium_points + {$paylist[$mc_gross]} WHERE name = '$custom'"; $qry2 = "UPDATE accounts SET premium_points = premium_points + {$paylist[$mc_gross]} WHERE name = '$custom'"; // Log Paypal Transaction $hak = fopen($file, "a"); fwrite($hak, $somecode); fclose($hak); $result2 = mysql_query($qry2); } else { echo("Error."); } ?> gracias de antemano Editado Abril 8, 2017 8 anos por Kuzaro (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.