Skip to content

Commit

Permalink
Merge pull request #9 from paynl/feature/PLUG-4011
Browse files Browse the repository at this point in the history
PLUG-4011 - PHP 8.3 compatibility
  • Loading branch information
woutse authored Dec 11, 2024
2 parents 9dd4579 + 1dac490 commit 81b36aa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">
<img src="https://www.pay.nl/uploads/1/brands/main_logo.png" />
</p>
<h1 align="center">PAY. WHMCS plugin</h1>
<h1 align="center">Pay. WHMCS plugin</h1>

<h1 align="left">Notice</h1>
This module is no longer maintained. You are free to use it. However, we have stopped development and will no longer offer support.
Expand All @@ -20,25 +20,32 @@ This plugin enables you to add PAY Payment methods for your WHMCS. Go to <a href

# Requirements
PHP 7.2 or higher\
PHP tested up to 8.1\
WHMCS maximum version: Tested up to 8.9.0
PHP tested up to 8.3\
WHMCS maximum version: Tested up to 8.11.2

# Installation
#### Installing
Download the package under [releases](https://github.com/paynl/whmcs-plugin/releases) Pay.nl-Whmcs-vx.x.x.zip <br/>
Unzip the file and upload everything from the PAY. plugin to the webroot of your server.

##### Setup
##### Setup (old)
1. Go to the WHMCS admin and click on Configuration > System Settings on your top right
2. Then click on 'Payment Gateways' on your left.
3. Click tab 'All Payment Gateways'.
4. Now you can select a PAY.nl payment method and enter your settings!
4. Now you can select a Pay. payment method and enter your settings!

##### Setup (new)
1. Go to the WHMCS admin and click on Configuration > Apps & Integrations on your top right
2. Click on the tab 'Browse'.
3. Click on 'Payment' on your left.
4. Find and select the Pay. payment method of your choice under 'Additional apps'.
5. Active the payment method and enter your settings!

#### Update instructions

Updating the plugin works the same as the installation of the plugin.
Download the package under [releases](https://github.com/paynl/whmcs-plugin/releases) Pay.nl-Whmcs-vx.x.x.zip <br/>
Unzip the file and upload everything from the PAY. plugin to the webroot of your server.
Unzip the file and upload everything from the Pay. plugin to the webroot of your server.

# Usage

Expand Down
2 changes: 1 addition & 1 deletion modules/gateways/paynl/src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static function getLink($params)
'extra1' => $params['invoiceid'],
'ipaddress' => \Paynl\Helper::getIp(),
'language' => $params['language'],
'object' => substr('whmcs 3.0.0|' . $whmcsversion . '|' . substr(phpversion(), 0, 3), 0, 64),
'object' => substr('whmcs 3.0.1|' . $whmcsversion . '|' . substr(phpversion(), 0, 3), 0, 64),
'orderNumber' => $params['invoiceid'],
'enduser' => array(
'initials' => $params['clientdetails']['firstname'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public function toArray()
if ($subItem === null) {
continue;
}
$key = trim(str_replace(get_class($this), '', $index));
$keyStr = str_replace(get_class(!empty($this) ? $this : ''), '', $index);
$key = trim(!empty($keyStr) ? $keyStr : '');
$result[$key] = $subItem instanceof Model
? $subItem->toArray()
: $subItem;
Expand Down

0 comments on commit 81b36aa

Please sign in to comment.