Résolu [IMPORTANT]Besoin d'aide en PHP

Statut
N'est pas ouverte pour d'autres réponses.
Inscription
31 Juillet 2013
Messages
286
Réactions
14
Points
1 436
Bonjour j'aimerai savoir comment on met un autobuy sur son site internet. Merci
 
Inscription
31 Juillet 2013
Messages
286
Réactions
14
Points
1 436
Sur youtube y'a pas , et hackeur fox un autobuy c'est genre enfaite la personne achete quelque chose sur le site avec paypal et il est redirigez sur le site avec le produit qu'il a acheter ( abonnements , etc ) Voila.
 
D

deleted34147

PHP:
<img src="https://www.paypal.com/fr_FR/FR/i/btn/btn_xpressCheckout.gif" align="left" style="margin-right:7px;">

ou

PHP:
<img src="https://www.paypal.com/fr_FR/FR/i/logo/PayPal_mark_37x23.gif" align="left" style="margin-right:7px;"><span style="font-size:11px; font-family: Arial, Verdana;">Le réflexe sécurité.</span>

Apercu :

Ou crée toi même un bouton HTML.
 

Benjamin_FLNC

Premium
Inscription
22 Juin 2012
Messages
1 450
Réactions
0
Points
14 709
Code:
<?php

if(isset($_GET['id']) && Is_Numeric($_GET['id']))
include 'config.php';
include 'includes/functions.php';
if (!$user -> loggedIn())
{
$temp = "http://".$_SERVER['HTTP_HOST'];
    if($_SERVER['PHP_SELF'][strlen($_SERVER['PHP_SELF'])-1] == "/")
    {
        $temp.=$_SERVER['PHP_SELF'];
    } else {
        $temp.=dirname($_SERVER['PHP_SELF']);
    }
    if($temp[strlen($temp)-1]=="/")
    {
        $temp = substr($temp, 0, strlen($temp)-1);
    }
    return dirname($temp);

}

$id = (int)$_GET['id'];
$paypalemail = $odb -> query("SELECT `email` FROM `gateway` LIMIT 1") -> fetchColumn(0);
$plansql = $odb -> prepare("SELECT * FROM `months` WHERE `ID` = :id");
$plansql -> execute(array(":id" => $id));
$row = $plansql -> fetch();
if($row === NULL) { die("Bad ID"); }
$paypalurl = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amount=".urlencode($row['price'])."&business=".urlencode($paypalemail)."&item_name=".urlencode($row['name'])."&item_number=".urlencode($row['ID']."_".$_SESSION['ID'])."&return=http://tonsite.com/ipn.php"."&rm=2&notify_url=http://tonsite.com/ipn.php"."&cancel_return=http://tonsite.com/pack.php"."&no_note=1&currency_code=EUR";

header("Location: ".$paypalurl);
?>
 
Statut
N'est pas ouverte pour d'autres réponses.
Haut