Esempio n. 1
0
<?php

require_once 'session_check.php';
require_once "../Stripe/Stripe.php";
Stripe::setApiKey("sk_test_6jbgLGl89PNJJJOjUg536nxZ");
if (isset($_GET['plan'])) {
    try {
        $customer = Stripe_Customer::retrieve($user->stripe_id);
        $subscription = $customer->subscriptions->retrieve($user->subscription_id);
        $subscription->plan = $_GET['plan'];
        $subscription->save();
    } catch (Stripe_CardError $e) {
        $error = $e->message;
    }
    changePlan($_GET['plan'], $user->id);
}
header('location: admin.php');
Esempio n. 2
0
/*
This script and site designed and built by Mark O'Russa, Mark Pro Audio Inc. Copyright 2008-2013.
*/
$fileInfo = array('fileName' => 'includes/myAccountMethods.php');
$debug->newFile($fileInfo['fileName']);
$success = false;
if (MODE == 'addCredits') {
    addCredits();
} elseif (MODE == 'buildBilling') {
    buildBilling();
} elseif (MODE == 'buildBillingHistory') {
    buildBillingHistory();
} elseif (MODE == 'buildBillingOffers') {
    buildBillingOffers();
} elseif (MODE == 'changePlan') {
    changePlan();
} elseif (MODE == 'parseReturnUrl') {
    parseReturnUrl();
} elseif (MODE == 'purchasePlanAmazon') {
    purchasePlanAmazon();
} elseif (MODE == 'saveMyInformation') {
    saveMyInformation();
} elseif (MODE == 'saveSettings') {
    saveSettings();
} else {
    $debug->add('No matching mode in ' . $fileInfo['fileName'] . '.');
}
function addCredits()
{
    //Build the initial plan selection.
    global $debug, $message, $success, $Dbc, $returnThis;