Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ export default {
nav: [
{ text: 'Home', link: '/' },
{ text: 'Docs', link: '/docs/installation/install' },
{ text: 'Blog', link: '/blog/v1.3-release' },
{ text: 'API', link: '/api/' },
{ text: 'Blog', link: '/blog/v1.4-release' },
{ text: 'Development', link: '/development/extensions/index.md' },
{ text: 'Marketplace', link: '/marketplace' }
],
Expand Down Expand Up @@ -134,7 +133,7 @@ export default {
]
},
{ text: 'Single Sign On', link: '/docs/guides/OAuth.md' },

{ text: 'WHMCS Importer', link: '/docs/guides/whmcs-importer' },
{ text: 'CLI', link: '/docs/guides/cli' },
{ text: 'FAQ', link: '/docs/guides/FAQ.md' }
]
Expand All @@ -157,6 +156,7 @@ export default {
{
text: 'Index',
items: [
{ text: 'V1.4 Release', link: '/blog/v1.4-release' },
{ text: 'V1.3 Release', link: '/blog/v1.3-release' },
{ text: 'V1.2 Release', link: '/blog/v1.2-release' },
{ text: 'V1.1 Release', link: '/blog/v1.1-release' },
Expand Down Expand Up @@ -205,6 +205,10 @@ export default {
{
text: 'OAuth',
items: [{ text: 'OAuth', link: '/development/OAuth.md' }]
},
{
text: 'API Reference',
link: '/api/',
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/landing/Hero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
<div class="relative z-10 flex flex-col items-center justify-center text-center min-h-[50vh] py-24 px-4">
<div class="flex justify-center">
<a href="/anniversary" class="mb-8">
<a href="/blog/v1.4-release" class="mb-8">
<div
class="flex items-center gap-2 rounded-full py-2 px-4 text-[var(--vp-c-text-1)] bg-[var(--vp-c-bg-alt)]/50 border border-[var(--vp-c-border)] text-sm transition duration-200 will-change-transform hover:scale-105">
<sparkling-fill class="size-5" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/blog/v1.4-release/notifications.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions blog/v1.4-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# V1.4 Release

## What's new?

* [**Billing agreements**](#billing-agreements) – added billing agreements, allowing customers to save and auto-charge payment methods. (Stripe and PayPal supported)
* **Invoice immutability** – invoice user details are now immutable after being issued.
* **Proforma invoices** – added support for making invoices as proforma invoices.
* [**Notifications center**](#notifications-center) – added notifications center to allow in-app notifications and notification preferences.
* [**WHMCS Importer**](/docs/guides/whmcs-importer) – added basic importing from WHMCS installations.
* **New homepage and footer design** – revamped the homepage and footer for a more modern look.
* Added **invoice paid** and **invoice payment failed** notification templates.

And many many more small tweaks and improvements. Read the full changelog [here](https://github.com/Paymenter/Paymenter/compare/v1.3.4...v1.4.0).



### Billing agreements

With billing agreements you can allow customers to save and auto-charge payment methods. This is especially useful for subscription-based services or recurring payments.

![image](/assets/images/blog/v1.4-release/billing-agreements.png)


### Notifications center

The new notifications center allows you to send in-app notifications to users. Users can also set their notification preferences to choose how they want to receive notifications.

![image](/assets/images/blog/v1.4-release/notifications.png)


## Upgrading

To upgrade to this release, you can follow the instructions in the [upgrade guide](/docs/installation/updating).

## Developer notices

Paymenter now has events available for cart items being added, removed, or updated. You can listen to these events to perform actions when cart items change.

See the [developer documentation](/development/event-list) for more information on how to use these events.


`enabled` and `disabled` functions now ALWAYS receive the extension instance as the first parameter. If you were previously using these functions without parameters, please update your code accordingly.
20 changes: 18 additions & 2 deletions development/event-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public function boot()

For the following models, you can listen to the `Created`, `Updated`, and `Deleted` events.

- `Cart`
- `CartItem`
- `Invoice`
- `InvoiceItem`
- `Order`
Expand Down Expand Up @@ -56,7 +58,7 @@ Both hooks accept a array of navigation items like this:
```php
return [
'name' => 'Announcements',
'route' => 'announcements.index',
'url' => route('announcements.index'), // or a external url
'priority' => 10,
];
```
Expand All @@ -67,8 +69,22 @@ return [

Hooks to include content on the home page.

```php
Event::listen('pages.home', function () {
return [
'view' => view('example::home'),
];
});
```

## `head`, `body` and `footer`

Those hooks are added right before the closing `</head>`, `<body>` and `</body>` tags respectively.


```php
Event::listen('head', function () {
return [
'view' => view('example::head'),
];
});
```
42 changes: 28 additions & 14 deletions development/extensions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,23 @@ Examples:

namespace Paymenter\Extensions\Others\Example;

use App\Attributes\ExtensionMeta;
use App\Classes\Extension\Extension;
use App\Helpers\ExtensionHelper;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\View;
use Paymenter\Extensions\Others\Example\Middleware\ExampleMiddleware;

#[ExtensionMeta(
name: 'Example',
description: 'An example extension',
version: '1.0.0',
author: 'Your Name',
url: 'https://yourwebsite.com',
// Icon can be a URL, relative path or base64 encoded string
icon: 'https://paymenter.org/logo-dark.svg'
)]
class Example extends Extension
{
public function boot()// [!code focus:33]
Expand Down Expand Up @@ -125,10 +135,18 @@ class Example extends Extension
// Registering navigation listeners
Event::listen('navigation', function () {
return [
'name' => 'Example',
'route' => 'example.index',
'icon' => 'ri-example-line',
'priority' => 10,
[
'name' => 'Example',
'url' => route('example.index'),
'icon' => 'ri-example-line',
'priority' => 10,
],
[
'name' => 'Sub Example',
'url' => 'https://example.com',
'icon' => 'ri-example-line',
'priority' => 20,
]
];
});
}
Expand All @@ -142,20 +160,16 @@ class Example extends Extension
namespace Paymenter\Extensions\Others\Example;

use App\Classes\Extension\Extension;
use App\Helpers\ExtensionHelper;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\View;
use Paymenter\Extensions\Others\Example\Middleware\ExampleMiddleware;
use App\Models\Extension as ExtensionModel;

class Example extends Extension
{
public function enabled()// [!code focus:4]
public function enabled(ExtensionModel $extension)// [!code focus:4]
{
// Code to run when the extension is enabled, for example seed data
}

public function disabled()// [!code focus:4]
public function disabled(ExtensionModel $extension)// [!code focus:4]
{
// Code to run when the extension is disabled
}
Expand All @@ -177,19 +191,19 @@ class Example extends Extension
public function installed()// [!code focus:5]
{
// Code to run when the extension is installed, for example run migrations:
ExtensionHelper::runMigrations(__DIR__ . '/database/migrations');
ExtensionHelper::runMigrations('extension/Others/Example/database/migrations');
}

public function uninstalled()// [!code focus:5]
{
// Code to run when the extension is uninstalled, for example rollback migrations:
ExtensionHelper::rollbackMigrations(__DIR__ . '/database/migrations');
ExtensionHelper::rollbackMigrations('extension/Others/Example/database/migrations');
}

public function upgraded()// [!code focus:5]
{
// Code to run when the extension is upgraded, for example run migrations:
ExtensionHelper::runMigrations(__DIR__ . '/database/migrations');
ExtensionHelper::runMigrations('extension/Others/Example/database/migrations');
}
}

Expand Down
92 changes: 92 additions & 0 deletions docs/guides/whmcs-importer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# WHMCS Importer

This guide will help you migrate from WHMCS to Paymenter.

This will import the following data from your WHMCS installation:

- Currencies
- Users (clients)
- Admins
- Categories
- Products
- Tickets
- Orders
- Services
- Service Cancellations
- Invoices
- Payments

::: warning
This will remove all existing data in your Paymenter installation! Make sure to back up your data before proceeding.
:::

## 1. Backup Your Data

Start by backing up your WHMCS database:

```bash
mysqldump -u root -p whmcs > whmcs.sql
```

## 2. Install Paymenter

Follow the [Installation Guide](/docs/installation/install.md) to install the latest version.

## 3. Create a Temporary Database

You’ll need a temporary database to import your old data:

```bash
mysql -u root -p
```

Inside the MySQL shell:

```sql
CREATE DATABASE whmcs_temp;
GRANT ALL PRIVILEGES ON whmcs_temp.* TO 'paymenter'@'127.0.0.1' WITH GRANT OPTION;
```

Now import your backup into the temporary database:

```bash
mysql -u root -p whmcs_temp < whmcs.sql
```

## 4. Migrate the Data

Run the migration command:

```bash
php artisan app:import-from-whmcs whmcs_temp
```

This command will prompt you for the database user’s password.

> It uses your `.env` file to read the host, port, and username automatically.
> Want to set them manually? Use this format:
>
> ```bash
> php artisan app:import-from-whmcs whmcs_temp username 127.0.0.1 3306
> ```

## 5. Cleanup

Once the migration is complete, you can remove the temporary database:

```bash
mysql -u root -p
```

Inside the MySQL shell:

```sql
DROP DATABASE whmcs_temp;
```


## 6. You're Done

You've successfully migrated from WHMCS to Paymenter!

If you encounter any issues, feel free to [open an issue on GitHub](https://github.com/Paymenter/Paymenter/issues).
14 changes: 0 additions & 14 deletions docs/installation/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@ apt install -y php8.3 php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,z

:::

#### Composer

```bash
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
```

## Installing

Creating the directory
Expand Down Expand Up @@ -98,14 +92,6 @@ Granting the right permissions to the folder:
chmod -R 755 storage/* bootstrap/cache/
```

## Downloading packages

Run this command to install the composer packages

```bash
composer install --no-dev --optimize-autoloader
```

## Creating database

> [!IMPORTANT]
Expand Down
6 changes: 0 additions & 6 deletions docs/installation/updating.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ curl -L https://github.com/paymenter/paymenter/releases/latest/download/paymente

Sometimes extensions also need to be updated, now is the time to check if any of your installed extensions have updates available.

### Update the dependencies

```bash
composer install --no-dev --optimize-autoloader
```

### Set the correct permissions

```bash
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ markdownStyles: false

heroLanding:
notice: New
noticeLink: 3rd Anniversary
noticeLink: v1.4 Release
text: Open-Source Billing, Built for Hosting
tagline: Automate subscriptions, eliminate billing chaos, and grow your hosting business – without vendor lock-ins or hidden costs.
getStartedButton: Get Started
Expand Down
Loading