extensions and fixes
This commit is contained in:
@ -41,8 +41,9 @@ class Bookmarks extends ApiController {
|
||||
$payload['notes'] ?? '',
|
||||
$payload['color'] ?? 'default',
|
||||
$payload['privacy'] ?? 'private',
|
||||
'external',
|
||||
$user
|
||||
);
|
||||
|
||||
if ( ! $result ) {
|
||||
$responseType = 'error';
|
||||
$response = 'There was an error creating your folder.';
|
||||
@ -52,5 +53,4 @@ class Bookmarks extends ApiController {
|
||||
}
|
||||
Views::view( 'api.response', ['response' => json_encode( [ $responseType => $response ], true )]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -58,10 +58,9 @@ class Member extends Controller {
|
||||
|
||||
$customer = self::$customers->findOrCreate( App::$activeUser->ID );
|
||||
if ( empty( $customer ) ) {
|
||||
Session::flash( 'error', 'no customer.' );
|
||||
Session::flash( 'error', 'You do not have any active payment methods. You can subscribe by going <a href="/member/join/1">here</a>' );
|
||||
return Redirect::to( 'member/manage' );
|
||||
}
|
||||
|
||||
$session = $stripe->billingPortal->sessions->create([
|
||||
'customer' => $customer,
|
||||
'return_url' => Routes::getAddress() . 'member/manage',
|
||||
|
@ -1,35 +1,51 @@
|
||||
<legend>Memberships</legend>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 25%">Name</th>
|
||||
<th style="width: 20%">status</th>
|
||||
<th style="width: 20%">Price</th>
|
||||
<th style="width: 10%">Start</th>
|
||||
<th style="width: 10%">End</th>
|
||||
<th style="width: 5%"></th>
|
||||
<th style="width: 5%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{LOOP}
|
||||
<tr>
|
||||
<td>{productName}</td>
|
||||
<td>{status}</td>
|
||||
<td>{prettyPrice}</td>
|
||||
<td>{DTC=date}{current_period_start}{/DTC}</td>
|
||||
<td>{DTC=date}{current_period_end}{/DTC}</td>
|
||||
<td><a href="{ROOT_URL}member/pause/{ID}" class="btn btn-sm btn-primary"><i class="fa fa-fw fa-pause"></i></a></td>
|
||||
<td><a href="{ROOT_URL}member/cancel/{ID}" class="btn btn-sm btn-danger"><i class="fa fa-fw fa-times"></i></a></td>
|
||||
</tr>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<tr>
|
||||
<td align="center" colspan="6">
|
||||
No results to show.
|
||||
</td>
|
||||
</tr>
|
||||
{/ALT}
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="{ROOT_URL}member/managepayment" class="btn btn-sm btn-primary">Manage Payment Method</a>
|
||||
<div class="container py-4">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<legend>Memberships</legend>
|
||||
<table class="table table-striped text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 25%">Name</th>
|
||||
<th style="width: 20%">Status</th>
|
||||
<th style="width: 20%">Price</th>
|
||||
<th style="width: 10%">Start</th>
|
||||
<th style="width: 10%">End</th>
|
||||
<th style="width: 5%"></th>
|
||||
<th style="width: 5%"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{LOOP}
|
||||
<tr>
|
||||
<td>{productName}</td>
|
||||
<td>{status}</td>
|
||||
<td>{prettyPrice}</td>
|
||||
<td>{DTC=date}{current_period_start}{/DTC}</td>
|
||||
<td>{DTC=date}{current_period_end}{/DTC}</td>
|
||||
<td>
|
||||
<a href="{ROOT_URL}member/pause/{ID}" class="btn btn-sm btn-primary">
|
||||
<i class="fa fa-fw fa-pause"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{ROOT_URL}member/cancel/{ID}" class="btn btn-sm btn-danger">
|
||||
<i class="fa fa-fw fa-times"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/LOOP}
|
||||
{ALT}
|
||||
<tr>
|
||||
<td colspan="7" class="text-center">
|
||||
No results to show.
|
||||
</td>
|
||||
</tr>
|
||||
{/ALT}
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="{ROOT_URL}member/managepayment" class="btn btn-sm btn-primary">
|
||||
Manage Payment Method
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user