Beispiel #1
0
require_once $abs_path . "../../config.php";
$i = $_REQUEST['i'];
if (!$i) {
    die("Missing invoice ID");
}
$invoice = get_invoice($i);
if (!$invoice) {
    die("Invoice not found");
}
$member = get_member($invoice['member_id']);
if (!$member) {
    die("Member not found: " . $m);
}
include "../../header.php";
// TODO: Vérifier qu'on a un numéro de transaction Paypal!
$invoice = record_payment($invoice, time(), $_REQUEST['comment']);
activate_member($invoice['member_id']);
send_payment_ack($invoice, $member);
?>
<h1>Merci d'adhérer à <?php 
echo config('name');
?>
</h1>
Votre cotisation de <?php 
echo $invoice['amount'];
?>
,00$ bien été reçue.

<p>Un excellent point de départ pour les nouveaux membres est notre <a href="http://facil.qc.ca/Membres/Information">kit de bienvenue</a>.</p>

<p>Nous espérons vous voir bientôt aux réunions et activités, et vous remercions encore une fois pour votre support.</p>
Beispiel #2
0
function pay($qty, $from, $to, $check_only = false, $only_equipped = true, $equip = 1)
{
    global $db, $prefix, $money_group, $money_group_size, $money_name, $shopper;
    $space_required = ($qty / $money_group + 1) * $money_group_size;
    // Check if buyer own money
    $money = get_total_user_money($from, $only_equipped);
    if ($money < $qty) {
        return "Denaro non disponibile<br>";
    }
    include_once './lib/sheet_lib.php';
    // Shopper has infinite space
    if ($to != $shopper && $equip) {
        if (get_user_space($to) - $space_required < 0) {
            return "Spazio non sufficiente per ricevere i soldi<br>";
        }
    }
    if ($check_only) {
        return;
    }
    remove_money($qty, $from);
    assign_money($qty, $to, $equip);
    include_once "./lib/alarms.php";
    record_payment($from, $to, $qty);
    return "Pagamento effettuato<br>";
}
Beispiel #3
0
# (at your option) any later version.
#
# Famesy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Famesy; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
require_once "../../functions.php";
require_once "../../config.php";
$i = $_REQUEST['i'];
if (!$i) {
    die("Missing invoice ID");
}
$invoice = get_invoice($i);
if (!$invoice) {
    die("Invoice not found");
}
$month = $_REQUEST['month'];
$day = $_REQUEST['day'];
$year = $_REQUEST['year'];
if (!($month && $day && $year)) {
    die("Invalid payment date: {$year}/{$month}/{$day}");
}
$date_paid = mktime(0, 0, 0, $month, $day, $year);
$invoice = record_payment($invoice, $date_paid, $_REQUEST['comment']);
activate_member($invoice['member_id']);
send_payment_ack($invoice);
header('Location: ../fiche?m=' . $invoice['member_id']);