diff --git a/.gitignore b/.gitignore index 3fe3461..373cac3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules assets/style.css -/public/* \ No newline at end of file +/public/* +/.idea* diff --git a/assets/image/showcase.png b/assets/image/showcase.png index d9ffcd5..e5afc48 100644 Binary files a/assets/image/showcase.png and b/assets/image/showcase.png differ diff --git a/assets/image/showcase_old.png b/assets/image/showcase_old.png new file mode 100644 index 0000000..d9ffcd5 Binary files /dev/null and b/assets/image/showcase_old.png differ diff --git a/assets/main.css b/assets/main.css index a5c2933..44a277e 100644 --- a/assets/main.css +++ b/assets/main.css @@ -1,3 +1,4 @@ +@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @tailwind base; @tailwind components; @tailwind utilities; @@ -46,6 +47,10 @@ --secondary-900:#fff; } +html { + font-family: 'Montserrat', sans-serif !important; +} + .button{ @apply inline-block py-2 px-4 rounded-md text-center font-sans font-medium duration-300; } @@ -180,4 +185,4 @@ #TableOfContents>ul>li { padding-bottom: 0.5rem; padding-top: 0.5rem; -} \ No newline at end of file +} diff --git a/content/docs/customization/create-a-extension.md b/content/docs/customization/create-a-extension.md deleted file mode 100644 index 84556dd..0000000 --- a/content/docs/customization/create-a-extension.md +++ /dev/null @@ -1,170 +0,0 @@ ---- -toc: true ---- -# Extension - - -## Gateway - -### Step 1: Create a new folder -First create a new folder in the `app/Extensions/Gateways` directory. The name of the folder will be the name of the extension. - -### Step 2: Create a new file called `index.php` -Create a new file called `index.php` in the folder you created in the previous step. This file will contain the extension's information and functions. - -### Step 3: Add the extension's information -Add the extension's information to the `index.php` file. This can be done by adding a function called `{yourExtensionName}_getConfig` to the file. This function should return an array with the extension's information. The following information is required: - -Check for the options [here](#configs-follow-the-following-structure) - - -### Step 4: Add the pay function -Add the pay function to the `index.php` file. This can be done by adding a function called `{yourExtensionName}_pay` to the file. - -This function should return the payment URL. The following information is attached to the function: - -- `total`: The total amount of the payment. -- `products`: The products of the payment. Using model Order_Products -- `orderId`: The ID of the order. - -Example -```php -function Example_pay($total, $products, $orderId) -{ - // Do something with the information - return "https://example.com/pay"; -} -``` - -### Step 5: Add the webhook function (optional) -If your gateway requires a webhook, you can create a file called `routes.php` in the folder you created in the previous step. This file will contain the webhook's route. - -Example -```php -Route::post('/webhook', function () { - // Do something with the webhook -}); -``` - - -## Server - -### Step 1: Create a new folder -First create a new folder in the `app/Extensions/Servers` directory. The name of the folder will be the name of the extension. - -### Step 2: Create a new file called `index.php` -Create a new file called `index.php` in the folder you created in the previous step. This file will contain the extension's information and functions. - -### Step 3: Add the extension's information -Add the extension's information to the `index.php` file. This can be done by adding a function called `{yourExtensionName}_getConfig` to the file. This function should return an array with the extension's information. The following information is required: - -Check for the options [here](#configs-follow-the-following-structure) - -### Step 4: Add a product configuration function -Add a product configuration function to the `index.php` file. This can be done by adding a function called `{yourExtensionName}_getProductConfig` to the file. This function should return an array with the product configuration. - -Check for the options [here](#configs-follow-the-following-structure) - -### Step 5: Add the create function -Add the create function to the `index.php` file. This can be done by adding a function called `{yourExtensionName}_createServer` to the file. - -$user = The user who created the server -$params = The parameters of the server, this also includes the configuration if Example_getUserConfig is used. ($params['config']) -$order = The order of the server - -```php -function Example_createServer($user, $params, $order) -{ - // Do something with the information e.g. create a server -} -``` - -### Step 6: Add the suspend function -Add the suspend function to the `index.php` file. This can be done by adding a function called `{yourExtensionName}_suspendServer` to the file. - -$user = The user who created the server -$params = The parameters of the server, this also includes the configuration if Example_getUserConfig is used. ($params['config']) -$order = The order of the server - -```php -function Example_suspendServer($user, $params, $order) -{ - // Do something with the information e.g. suspend a server -} -``` - -### Step 7: Add the unsuspend function -Add the unsuspend function to the `index.php` file. This can be done by adding a function called `{yourExtensionName}_unsuspendServer` to the file. - -$user = The user who created the server -$params = The parameters of the server, this also includes the configuration if Example_getUserConfig is used. ($params['config']) -$order = The order of the server - -```php -function Example_unsuspendServer($user, $params, $order) -{ - // Do something with the information e.g. unsuspend a server -} -``` - -### Step 8: Add the terminate function -Add the terminate function to the `index.php` file. This can be done by adding a function called `{yourExtensionName}_terminateServer` to the file. - -$user = The user who created the server -$params = The parameters of the server, this also includes the configuration if Example_getUserConfig is used. ($params['config']) -$order = The order of the server - -```php -function Example_terminateServer($user, $params, $order) -{ - // Do something with the information e.g. terminate a server -} -``` - -### Step 9: Add the getUserConfig function (optional) - -Add the getUserConfig function to the `index.php` file. This can be done by adding a function called `{yourExtensionName}_getUserConfig` to the file. - -Check for the options [here](#configs-follow-the-following-structure) - - -## Configs follow the following structure: - -This works for both gateways and payment methods. - -Functions: _getConfig, _getProductConfig, _getUserConfig - -```php -[ - [ - "name" => "api_key", - "friendlyName" => "API Key", - "type" => "text", - "required" => true - ], - [ - "name" => "environment", - "friendlyName" => "Whether to use the live or development environment", - "type" => "dropdown", - "required" => true, - "options" => [ - [ - "name" => "Live", - "value" => "live" - ], - [ - "name" => "Development", - "value" => "development" - ] - ] - ], -] -``` - -- `name`: The name of the field. This will be used to get the value of the field. -- `friendlyName`: The friendly name of the field. This will be used to display the name of the field. -- `description`: The description of the field. This will be used to display the description of the field. This is optional. -- `type`: The type of the field. This can be `text`, `boolean`, `dropdown`. -- `required`: Whether the field is required or not. This can be `true` or `false`. - -- `options`: The options of the field. This is only required when the type is `dropdown`. This should be an array with the options. The key of the option should be the value of the option and the value of the option should be the name of the option. diff --git a/content/docs/customization/create-a-gateway-extension.md b/content/docs/customization/create-a-gateway-extension.md new file mode 100644 index 0000000..4a88c7d --- /dev/null +++ b/content/docs/customization/create-a-gateway-extension.md @@ -0,0 +1,157 @@ +--- +toc: true +--- +# How to create a gateway extension + +### Step 1: Create a new folder +First create a new folder in the `app/Extensions/Gateways` directory. The name of the folder will be the name of the extension. + +### Step 2: Create a new file with the same name as the folder +Create a new file with the same name as the folder in the folder you created in the previous step. This file will contain the extension's information and functions. + +### Step 3: Add the extension's information +Add the first public function named `getConfig`. This function returns the possible settings for the extension when you enter them in the panel + +#### Example: +```php +public function getConfig() + { + return [ + [ + 'name' => 'stripe_secret_key', + 'friendlyName' => 'Stripe Secret Key', + 'type' => 'text', + 'description' => 'Stripe secret key', + 'required' => true, + ], + [ + 'name' => 'stripe_webhook_secret', + 'friendlyName' => 'Stripe webhook secret', + 'type' => 'text', + 'description' => 'Stripe webhook secret', + 'required' => true, + ], + [ + 'name' => 'stripe_test_mode', + 'friendlyName' => 'Stripe test mode', + 'type' => 'boolean', + 'description' => 'Stripe test mode', + 'required' => false, + ], + [ + 'name' => 'stripe_test_key', + 'friendlyName' => 'Stripe test key', + 'type' => 'text', + 'description' => 'Stripe test key', + 'required' => false, + ], + ]; + } +``` + +- `name`: The name of the field. This will be used to get the value of the field. +- `friendlyName`: The friendly name of the field. This will be used to display the name of the field. +- `description`: The description of the field. This will be used to display the description of the field. This is optional. +- `type`: The type of the field. This can be `text`, `boolean`, `dropdown`. +- `required`: Whether the field is required or not. This can be `true` or `false`. + +- `options`: The options of the field. This is only required when the type is `dropdown`. This should be an array with the options. The key of the option should be the value of the option and the value of the option should be the name of the option. + + + +### Step 4: Add the pay function +This can be done by adding a public function called `pay` to the file. + +This function should return the payment URL. The following information is attached to the function: + +- `total`: The total amount of the payment. +- `products`: The products of the payment. Using model Order_Products +- `orderId`: The ID of the order. + +#### Example: +```php +public function pay($total, $products, $orderId) + { + $stripe = $this->stripeClient(); + $order = $this->getUrl($total, $products, $orderId); + + return $stripe->checkout->sessions->retrieve($order->id, [])->url; + } +``` + +*The getUrl function is not required, it is just added to make the code easier to understand* +```php +public function getUrl($total, $products, $orderId) + { + $client = $this->stripeClient(); + // Create array with all the products + $items = []; + foreach ($products as $product) { + $items[] = [ + 'price_data' => [ + 'currency' => ExtensionHelper::getCurrency(), + 'product_data' => [ + 'name' => $product->name, + ], + 'unit_amount' => round($product->price / $product->quantity * 100, 0) + ], + 'quantity' => $product->quantity, + ]; + } + $order = $client->checkout->sessions->create([ + 'line_items' => $items, + 'mode' => 'payment', + 'success_url' => route('clients.invoice.show', $orderId), + 'cancel_url' => route('clients.invoice.show', $orderId), + 'customer_email' => auth()->user()->email, + 'metadata' => [ + 'user_id' => auth()->user()->id, + 'order_id' => $orderId, + ], + ]); + + return $order; + } +``` + +### Step 5: Add the webhook function (optional) +If your gateway requires a webhook, you can create a file called `routes.php` in the folder you created in the previous step. This file will contain the webhook's route. + +#### Example: +```php +Route::post('/stripe/webhook', [App\Extensions\Gateways\Stripe\Stripe::class, 'webhook']); +``` + +#### Example webhook function in php file: +```php +public function webhook(Request $request) + { + $payload = $request->getContent(); + $sig_header = $request->header('stripe-signature'); + $endpoint_secret = ExtensionHelper::getConfig('Stripe', 'stripe_webhook_secret'); + $event = null; + + try { + $event = \Stripe\Webhook::constructEvent( + $payload, + $sig_header, + $endpoint_secret + ); + } catch (\UnexpectedValueException $e) { + // Invalid payload + http_response_code(400); + exit; + } catch (\Stripe\Exception\SignatureVerificationException $e) { + // Invalid signature + http_response_code(400); + exit; + } + if ($event->type == 'checkout.session.completed') { + $order = $event->data->object; + $order_id = $order->metadata->order_id; + ExtensionHelper::paymentDone($order_id, 'Stripe', $order->payment_intent); + } + } +``` + +You can find the finished extension in the [GitHub Repository](https://github.com/Paymenter/Paymenter/tree/master/app/Extensions/Gateways/Stripe) diff --git a/content/docs/customization/create-a-server-extension.md b/content/docs/customization/create-a-server-extension.md new file mode 100644 index 0000000..a233922 --- /dev/null +++ b/content/docs/customization/create-a-server-extension.md @@ -0,0 +1,259 @@ +--- +toc: true +--- +# How to create a server extension + +### Step 1: Create a new folder +First create a new folder in the `app/Extensions/Servers` directory. The name of the folder will be the name of the extension. + +### Step 2: Create a new file with the same name as the folder +Create a new file with the same name as the folder in the folder you created in the previous step. This file will contain the extension's information and functions. + +### Step 3: Add the extension's information +Add the first public function named `getConfig`. This function returns the possible settings for the extension when you enter them in the panel + +#### Example: +```php +public function getConfig() + { + return [ + [ + 'name' => 'host', + 'friendlyName' => 'Pterodactyl panel url', + 'type' => 'text', + 'required' => true, + ], + [ + 'name' => 'apiKey', + 'friendlyName' => 'API Key', + 'type' => 'text', + 'required' => true, + ], + ]; + } +``` + +You can see what the settings mean [here](#configs-follow-the-following-structure). + +### Step 4: Add a product configuration function +This can be done by adding a public function called `getProductConfig` to the file. This function should return an array with the product configuration. + +#### Example: +```php +public function getProductConfig($options) + { + //Determining the values of the variables for $nodeList, $locationList, $nestList, + + return [ + [ + 'name' => 'node', + 'friendlyName' => 'Pterodactyl Node (leave empty for node assigned to location)', + 'type' => 'dropdown', + 'options' => $nodeList, + ], + [ + 'name' => 'location', + 'friendlyName' => 'Pterodactyl Location', + 'type' => 'dropdown', + 'options' => $locationList, + 'required' => true, + ], + [ + 'name' => 'egg', + 'friendlyName' => 'Pterodactyl Egg ID', + 'type' => 'text', + 'required' => true, + ], + [ + 'name' => 'nest', + 'friendlyName' => 'Pterodactyl Nest', + 'type' => 'dropdown', + 'options' => $nestList, + 'required' => true, + ], + [ + 'name' => 'memory', + 'friendlyName' => 'Pterodactyl Memory', + 'type' => 'text', + 'required' => true, + ], + [ + 'name' => 'swap', + 'friendlyName' => 'Pterodactyl Swap', + 'type' => 'text', + 'required' => true, + ], + [ + 'name' => 'disk', + 'friendlyName' => 'Pterodactyl Disk', + 'type' => 'text', + 'required' => true, + ], + [ + 'name' => 'io', + 'friendlyName' => 'Pterodactyl IO', + 'type' => 'text', + 'required' => true, + 'description' => 'IO is a number between 10 and 1000. 500 is the default value.', + ], + [ + 'name' => 'cpu', + 'friendlyName' => 'CPU limit', + 'type' => 'text', + 'required' => true, + ], + [ + 'name' => 'databases', + 'friendlyName' => 'Pterodactyl Database', + 'type' => 'text', + 'required' => true, + ], + [ + 'name' => 'backups', + 'friendlyName' => 'Pterodactyl Backups', + 'type' => 'text', + 'required' => true, + ], + [ + 'name' => 'servername', + 'friendlyName' => 'Product Name (leave empty for auto generated name)', + 'type' => 'text', + 'required' => false, + 'description' => 'If you do not fill in this field the server name will be set to the PRODUCT NAME #ID eg. "Test Product #26"', + ], + [ + 'name' => 'allocation', + 'friendlyName' => 'Pterodactyl Allocation', + 'type' => 'text', + 'required' => true, + 'description' => 'How many ports the user can allocate. Must be at least one.', + ], + [ + 'name' => 'skip_scripts', + 'friendlyName' => 'Pterodactyl Skip Scripts', + 'type' => 'boolean', + 'description' => 'Decides if Pterodactyl will skip install scripts', + ], + ]; + } +``` + +You can see what the settings mean [here](#configs-follow-the-following-structure). + +### Step 5: Add the create function +This can be done by adding a public function called `createServer` to the file. + +$user = The user who created the server +$parmas = The parameters of the server, this also includes the configuration if getUserConfig is used. ($parmas['config']) +$order = The order of the server +$product = The product of the server +$configurableOptions = The configurable options of the server + +```php +public function createServer($user, $parmas, $order, $product, $configurableOptions) +{ + // Do something with the information e.g. create a server +} +``` + +### Step 6: Add the suspend function +This can be done by adding a public function called `suspendServer` to the file. + +$user = The user who created the server +$parmas = The parameters of the server, this also includes the configuration if getUserConfig is used. ($parmas['config']) +$order = The order of the server +$product = The product of the server +$configurableOptions = The configurable options of the server + + +```php +public function suspendServer($user, $params, $order, $product, $configurableOptions) +{ + // Do something with the information e.g. suspend a server +} +``` + +### Step 7: Add the unsuspend function +This can be done by adding a public function called `unsuspendServer` to the file. + +$user = The user who created the server +$parmas = The parameters of the server, this also includes the configuration if getUserConfig is used. ($parmas['config']) +$order = The order of the server +$product = The product of the server +$configurableOptions = The configurable options of the server + + +```php +public function unsuspendServer($user, $params, $order, $product, $configurableOptions) +{ + // Do something with the information e.g. unsuspend a server +} +``` + +### Step 8: Add the terminate function +This can be done by adding a public function called `terminateServer` to the file. + +$user = The user who created the server +$parmas = The parameters of the server, this also includes the configuration if getUserConfig is used. ($parmas['config']) +$order = The order of the server +$product = The product of the server +$configurableOptions = The configurable options of the server + +```php +public function terminateServer($user, $params, $order, $product, $configurableOptions) +{ + // Do something with the information e.g. terminate a server +} +``` + +### Step 9: Add the getUserConfig function (optional) + +This can be done by adding a public function called `getUserConfig` to the file. + +You can see what the settings mean [here](#configs-follow-the-following-structure). + +### Step 10: Add the getLink function (optional) + +This is a function that returns a link to a service in a panel such as pterodactyl. If the function returns a link it will be displayed in the panel. This can be done by adding a public `getLink` function to the php file + +$product = The product of the server + +```php +public function getLink($product) +{ + // Do something with the information e.g. return the link to the server +} +``` + +## Configs follow the following structure: + +This works for both gateways and payment methods. + +Functions: getConfig, getProductConfig, getUserConfig + +```php +[ + [ + 'name' => 'host', + 'friendlyName' => 'Pterodactyl panel url', + 'type' => 'text', + 'required' => true, + ], + [ + 'name' => 'apiKey', + 'friendlyName' => 'API Key', + 'type' => 'text', + 'required' => true, + ], +]; +``` + +- `name`: The name of the field. This will be used to get the value of the field. +- `friendlyName`: The friendly name of the field. This will be used to display the name of the field. +- `description`: The description of the field. This will be used to display the description of the field. This is optional. +- `type`: The type of the field. This can be `text`, `boolean`, `dropdown`. +- `required`: Whether the field is required or not. This can be `true` or `false`. + +- `options`: The options of the field. This is only required when the type is `dropdown`. This should be an array with the options. The key of the option should be the value of the option and the value of the option should be the name of the option. + +You can find the finished extension in the [GitHub Repository](https://github.com/Paymenter/Paymenter/tree/master/app/Extensions/Servers/Pterodactyl) diff --git a/content/docs/getting-started/extensions.md b/content/docs/getting-started/extensions.md index 285238e..6ee4232 100644 --- a/content/docs/getting-started/extensions.md +++ b/content/docs/getting-started/extensions.md @@ -3,28 +3,16 @@ toc: true --- # Extensions -Most of the documentation about extensions can be found in the [GitHub repository](https://github.com/Paymenter/Extensions#extensions) +{{< specialcss >}} -## Default included +| **Servers** | **Gateways** | +|:-------------------------------------------:|:----------------------------------------:| +| [Pterodactyl](https://pterodactyl.io/) | [Stripe](https://stripe.com/) | +| [Proxmox](https://www.proxmox.com/) | [Mollie](https://www.mollie.com/) | +| [DirectAdmin](https://www.directadmin.com/) | [PayPal](https://www.paypal.com/) | +| [VirtFusion](https://virtfusion.com/) | [Xendit](https://www.xendit.co/) | +| [Virtualizor](https://www.virtualizor.com/) | +| [CyberPanel](https://cyberpanel.net/) | +{{< /specialcss >}} -### Server backends -* [DirectAdmin](https://www.directadmin.com/) -* [VirtFusion](https://virtfusion.com/) -* [Virtualizor](https://www.virtualizor.com/) -* [Pterodactyl](https://pterodactyl.io/) - -### Payment methods -* [Stripe](https://stripe.com/) -* [PayPal](https://www.paypal.com/) -* [Mollie](https://www.mollie.com/) -* [Xendit](https://www.xendit.co/) - -## Optional downloadable -You can download these extensions from the [GitHub repository](https://github.com/Paymenter/Extensions). -### Server backends -* [ISPConfig](https://www.ispconfig.org/) -* [CyberPanel](https://cyberpanel.net/) - -### Payment methods -* [PayPal IPN](https://www.paypal.com/) (PayPal is a easier way to setup PayPal be only giving your email address) -* [Stripe Sofort](https://stripe.com/) (Stripe gateway which directly redirects to the bank instead of using stripe's checkout) +And many more, browse our [marketplace](https://market.paymenter.org/extensions) for more extensions. Or use the in-app extension manager to install extensions. diff --git a/content/docs/getting-started/installation.md b/content/docs/getting-started/installation.md index 64ffae8..ecfba85 100644 --- a/content/docs/getting-started/installation.md +++ b/content/docs/getting-started/installation.md @@ -79,6 +79,7 @@ composer install --no-dev --optimize-autoloader # Only run the command below if you are installing this Panel for # the first time and do not have any Paymenter Panel data in the database. php artisan key:generate --force +php artisan storage:link ``` {{< warning title="Warning" >}} diff --git a/content/docs/getting-started/introduction.md b/content/docs/getting-started/introduction.md index 0a78780..1f5f342 100644 --- a/content/docs/getting-started/introduction.md +++ b/content/docs/getting-started/introduction.md @@ -12,20 +12,22 @@ Paymenter is an open source gateway for hosting companies. Paymenter is develope Paymenter aims to be a complete solution for hosting companies. We are working on a lot of features and we are always open for suggestions. +{{< specialcss >}} + +| **Servers** | **Gateways** | +|:-------------------------------------------:|:----------------------------------------:| +| [Pterodactyl](https://pterodactyl.io/) | [Stripe](https://stripe.com/) | +| [Proxmox](https://www.proxmox.com/) | [Mollie](https://www.mollie.com/) | +| [DirectAdmin](https://www.directadmin.com/) | [PayPal](https://www.paypal.com/) | +| [VirtFusion](https://virtfusion.com/) | [Xendit](https://www.xendit.co/) | +| [Virtualizor](https://www.virtualizor.com/) | +| [CyberPanel](https://cyberpanel.net/) | +{{< /specialcss >}} + +And many more, browse our [marketplace](https://market.paymenter.org/extensions) for more extensions. Or use the in-app extension manager to install extensions. -## Included extensions* -* [DirectAdmin](https://www.directadmin.com/) -* [VirtFusion](https://virtfusion.com/) -* [Virtualizor](https://www.virtualizor.com/) -* [Pterodactyl](https://pterodactyl.io/) -## Included Payment methods* -* [Stripe](https://stripe.com/) -* [PayPal](https://www.paypal.com/) -* [Mollie](https://www.mollie.com/) -* [Xendit](https://www.xendit.co/) -*These extensions and payment methods are included in the Paymenter core. You can download other extensions and payment methods from the [GitHub repository](https://github.com/Paymenter/Extensions). Or use the included [Extension Manager](../extensions) to install them. {{< tip title="Handy links" >}} * [Github](https://github.com/Paymenter) Leave a star if you like the project! * [Join our Discord](https://discord.gg/v42TvwT58H) @@ -33,7 +35,13 @@ Paymenter aims to be a complete solution for hosting companies. We are working o * [E-mail us](mailto:hello@paymenter.org) {{< /tip >}} +## Sponsors +We would like to thank our sponsors for supporting us. If you want to sponsor us, please go to our [Github Sponsors](https://github.com/CorwinDev) page. + +[![image](../sponsors/nordblade.png)](https://nordblade.com) + + ### Get Paymenter as PaaS You can get Paymenter as a PaaS (Paymenter as a Service) from [Paymenter.org](https://paymenter.org/). We provide one package for now which has a monthly price of $5.00. This package includes unlimited resources needed for Paymenter -Contact us at [Email](mailto:corwin@paymenter.org?subject=Paymenter%20PaaS&body=Hello%20Corwin%2C%0A%0AI%20would%20like%20to%20get%20Paymenter%20as%20a%20PaaS.%0A%0AMy%20URL%20is%3A%20https%3A%2F%2Fexample.com%0A%0ARegards%2C) \ No newline at end of file +Contact us at [Email](mailto:corwin@paymenter.org?subject=Paymenter%20PaaS&body=Hello%20Corwin%2C%0A%0AI%20would%20like%20to%20get%20Paymenter%20as%20a%20PaaS.%0A%0AMy%20URL%20is%3A%20https%3A%2F%2Fexample.com%0A%0ARegards%2C) diff --git a/content/docs/getting-started/sponsors/nordblade.png b/content/docs/getting-started/sponsors/nordblade.png new file mode 100644 index 0000000..b42faac Binary files /dev/null and b/content/docs/getting-started/sponsors/nordblade.png differ diff --git a/content/docs/guides/migration/index.md b/content/docs/guides/migration/index.md new file mode 100644 index 0000000..dda6314 --- /dev/null +++ b/content/docs/guides/migration/index.md @@ -0,0 +1,14 @@ +1. Backup your hidden ```.env``` file containing the decryption ```APP_KEY``` from /var/www/paymenter/ + +2. Export the database, in this case ours is named paymenter + +```mysqldump -u root -p --opt paymenter > /var/www/paymenter/panel.sql``` +The .sql file would be saved in the /var/www/paymenter/ folder. + +3. Follow the paymenter installation documentation to install the paymenter on your new server. + +4. Transfer the paymenter.sql file to your new server and import the database. Make sure you're in the folder containing your .sql dump when performing the commands. + +```mysql -u root -p paymenter < paymenter.sql``` + +5. After this, transfer your old .env file to the /var/www/paymenter location to complete the panel migration. diff --git a/content/features/pterodactyl/index.md b/content/features/pterodactyl/index.md index 3e4cc6d..b3e3cea 100644 --- a/content/features/pterodactyl/index.md +++ b/content/features/pterodactyl/index.md @@ -30,7 +30,7 @@ Insert your API key and your Pterodactyl URL in the Paymenter admin panel. Here * Below you will see a fully functional example of Product -![image](productsettingsexample.png) +![image](productsettingsexample2.png) * #### Configurable Options diff --git a/content/features/pterodactyl/productsettingsexample2.png b/content/features/pterodactyl/productsettingsexample2.png new file mode 100644 index 0000000..aec9cd3 Binary files /dev/null and b/content/features/pterodactyl/productsettingsexample2.png differ diff --git a/content/features/stripe/index.md b/content/features/stripe/index.md index 84400df..0998f1e 100644 --- a/content/features/stripe/index.md +++ b/content/features/stripe/index.md @@ -1,35 +1,35 @@ ---- -toc: true ---- -# Stripe - -## Overview - -Stripe is a payment gateway that allows you to accept many different payment methods. It is a very popular payment gateway and is used by many companies. - -[Website](https://stripe.com) - -## Setup with Paymenter - -#### 1. Create a API key in Stripe - -Go to the [Stripe dashboard](https://dashboard.stripe.com/apikeys) and reveal your secret key. Copy the key and insert it in the Paymenter admin panel. - -![image](stripe.png) - -#### 2. Configure stripe webhook - -Go to the [Developers tab –> Webhooks](https://dashboard.stripe.com/test/webhooks) and click "Add endpoint". \ -In the **Endpoint URL** field, type `ENTER YOUR PANEL URL HERE/extensions/stripe/webhook` - -It should look about like this: -![image](2.png) - -Then click “Select events” and select all of them, after doing this you can click "Add endpoint" - -After doing this you will see the webhook information page, under “Signing secret” there will be a "Reveal" button, click it and copy the webhook secret, then paste it into the Paymenter panel - -![image](3.png) - -## That's all! -You can now use Stripe as a payment gateway for your products. +--- +toc: true +--- +# Stripe + +## Overview + +Stripe is a payment gateway that allows you to accept many different payment methods. It is a very popular payment gateway and is used by many companies. + +[Website](https://stripe.com) + +## Setup with Paymenter + +#### 1. Create a API key in Stripe + +Go to the [Stripe dashboard](https://dashboard.stripe.com/apikeys) and reveal your secret key. Copy the key and insert it in the Paymenter admin panel. + +![image](stripe.png) + +#### 2. Configure stripe webhook + +Go to the [Developers tab –> Webhooks](https://dashboard.stripe.com/test/webhooks) and click "Add endpoint". \ +In the **Endpoint URL** field, type `ENTER YOUR PANEL URL HERE/extensions/stripe/webhook` + +It should look about like this: +![image](2.png) + +Then click “Select events” and select all of them, after doing this you can click "Add endpoint" + +After doing this you will see the webhook information page, under “Signing secret” there will be a "Reveal" button, click it and copy the webhook secret, then paste it into the Paymenter panel + +![image](3.png) + +## That's all! +You can now use Stripe as a payment gateway for your products. \ No newline at end of file diff --git a/data/sidebar.yml b/data/sidebar.yml index 16099f8..0433a15 100644 --- a/data/sidebar.yml +++ b/data/sidebar.yml @@ -17,10 +17,12 @@ slug: customization pages: - title: Create a theme - - title: Create a extension + - title: Create a gateway extension + - title: Create a server extension + #- title: Create a notification extension - title: Guides slug: guides pages: - title: OAuth - title: Docker - - title: Configurable Options \ No newline at end of file + - title: Configurable Options diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1225812..3cccecf 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -176,8 +176,8 @@ {{ if (eq .Page.Params.toc true) }}
-

On this page

- {{ .TableOfContents | replaceRE "On this page + {{ .TableOfContents | replaceRE "
@@ -232,4 +232,4 @@

Follow Us - \ No newline at end of file + diff --git a/layouts/index.html b/layouts/index.html index fdde7f6..6508ebe 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -179,7 +179,7 @@

Open- stripe {{ $paypal := resources.Get "image/paypal.svg" }} paypal - more + and more...

@@ -298,4 +298,4 @@

Follow Us - \ No newline at end of file + diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 86f55c1..6c56920 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -26,4 +26,4 @@

+ {{- .Inner | markdownify -}} + + +