Пример #1
0
        break;
    case 'canceled':
    case 'unpaid':
        $status_label = elgg_echo('stripe:subscriptions:status:inactive');
        break;
}
if ($subscription->canceled_at) {
    $status[] = elgg_echo('stripe:subscriptions:status:canceled_at', array(date('M d, Y', $subscription->canceled_at)));
}
if ($subscription->cancel_at_period_end) {
    $status[] = elgg_echo('stripe:subscriptions:status:ends_at', array(date('M d, Y', $subscription->current_period_end)));
}
if ($subscription->ended_at) {
    $status[] = elgg_echo('stripe:subscriptions:status:ended_at', array(date('M d, Y', $subscription->ended_at)));
}
$cycle = new StripeBillingCycle('', $subscription->plan->interval, $subscription->plan->interval_count);
$pricing = new StripePricing($subscription->plan->amount / 100, 0, 0, $subscription->plan->currency);
$actions = elgg_view_menu('stripe-actions', array('object' => $subscription, 'sort_by' => 'priority', 'vars' => $vars));
?>

<div class="stripe-row stripe-object stripe-subscription">
	<div class="stripe-col-3of12 stripe-subscription-plan-name">
		<?php 
echo $subscription->plan->name;
?>
	</div>
	<div class="stripe-col-3of12 stripe-subscription-status">
		<?php 
echo $status_label;
?>
	</div>
Пример #2
0
<?php

$cycles = StripeBillingCycle::getCycles($vars);
foreach ($cycles as $short => $options) {
    $vars['options_values'][$short] = $options['label'];
}
echo elgg_view('input/dropdown', $vars);
Пример #3
0
">
	<div class="stripe-col-6of12 stripe-details">

		<?php 
echo '<div class="stripe-info">';
echo elgg_echo('stripe:ivnoices:items:type:' . $invoiceitem->type);
echo '</div>';
switch ($invoiceitem->type) {
    default:
    case 'invoiceitem':
        echo '<div class="stripe-info">';
        echo $invoiceitem->description;
        echo '</div>';
        break;
    case 'subscription':
        $cycle = new StripeBillingCycle('', $invoiceitem->plan->interval, $invoiceitem->plan->interval_count);
        $pricing = new StripePricing($invoiceitem->plan->amount / 100, 0, 0, $invoiceitem->plan->currency);
        echo '<div class="stripe-info">';
        echo $invoiceitem->plan->name;
        echo '</div>';
        echo '<div class="stripe-info">';
        echo $pricing->getHumanAmount() . ' ' . $cycle->getLabel();
        echo '</div>';
        break;
}
echo elgg_view_menu('stripe-actions', array('object' => $invoiceitem, 'sort_by' => 'priority', 'vars' => $vars));
?>
	</div>
	<div class="stripe-col-4of12 stripe-invoiceitem-type">
		<?php 
echo date('M d, Y', $invoiceitem->period->start) . ' - ' . date('M d, Y', $invoiceitem->period->end);