Skip to content

Commit ba7679d

Browse files
Merge pull request #25 from AppInlet/release/1.7.0
[1.7.0]
2 parents 35c7657 + 2c03b3a commit ba7679d

21 files changed

Lines changed: 472 additions & 319 deletions

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## [1.7.0](https://github.com/Payfast/mod-gravityforms/releases/tag/v1.7.0)
4+
5+
### Added
6+
7+
- Enhanced plugin compatibility with WordPress Marketplace by adhering to updated code quality standards, improving
8+
performance and security.
9+
- Upgraded Payfast Common Library to version 1.4.0.
10+
311
## [1.6.0](https://github.com/Payfast/mod-gravityforms/releases/tag/v1.6.0)
412

513
### Added

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# mod-gravityforms
22

3-
## Payfast module v1.6.0 for Gravity Forms v2.9.1
3+
## Payfast module v1.7.0 for Gravity Forms v2.9.13
44

55
This is the Payfast module for Gravity Forms. Please feel free
66
to [contact the Payfast support team](https://payfast.io/contact/) should you require any assistance.
@@ -10,7 +10,7 @@ to [contact the Payfast support team](https://payfast.io/contact/) should you re
1010
1. Log in to your WordPress Admin panel.
1111
2. Navigate to **Plugins > Add New > Upload Plugin**.
1212
3. Click **Choose File** and select
13-
**[gravityformspayfast.zip](https://github.com/Payfast/mod-gravityforms/releases/download/v1.6.0/gravityformspayfast.zip)**.
13+
**[gravityformspayfast.zip](https://github.com/Payfast/mod-gravityforms/releases/download/v1.7.0/gravityformspayfast.zip)**.
1414
4. Click **Install Now**.
1515
5. Click **Activate Plugin**.
1616
5. Go to **Forms** -> **Settings**, under **Default Currency**, select **South African Rand** and click

gravityformspayfast/class-gf-payfast.php

Lines changed: 159 additions & 73 deletions
Large diffs are not rendered by default.

gravityformspayfast/classes/PfGfForm.php

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public static function getFields(): array
2222
'Payfast Merchant ID',
2323
'gravityformspayfast'
2424
) . GFPayFast::H6_TAG_END . __(
25-
'Enter your Payfast Merchant ID.',
26-
'gravityformspayfast'
27-
)
25+
'Enter your Payfast Merchant ID.',
26+
'gravityformspayfast'
27+
)
2828
),
2929
array(
3030
'name' => 'payfastMerchantKey',
@@ -36,9 +36,9 @@ public static function getFields(): array
3636
'Payfast Merchant Key',
3737
'gravityformspayfast'
3838
) . GFPayFast::H6_TAG_END . __(
39-
'Enter your Payfast Merchant Key.',
40-
'gravityformspayfast'
41-
)
39+
'Enter your Payfast Merchant Key.',
40+
'gravityformspayfast'
41+
)
4242
),
4343
array(
4444
'name' => 'passphrase',
@@ -50,9 +50,9 @@ public static function getFields(): array
5050
'Payfast Passphrase',
5151
'gravityformspayfast'
5252
) . GFPayFast::H6_TAG_END . __(
53-
'Only enter a passphrase if it is set on your Payfast account.',
54-
'gravityformspayfast'
55-
)
53+
'Only enter a passphrase if it is set on your Payfast account.',
54+
'gravityformspayfast'
55+
)
5656
),
5757
array(
5858
'name' => 'mode',
@@ -152,25 +152,28 @@ public function setInitialAmnt(): array
152152
{
153153
return array(
154154
'name' => 'initialAmount',
155-
'label' => esc_html__('Initial Amount', 'gravityforms'),
155+
'label' => esc_html__('Initial Amount', 'gravityformspayfast'),
156156
'type' => 'select',
157157
'choices' => $this->recurring_amount_choices(),
158158
'required' => true,
159159
'tooltip' => GFPayFast::H6_TAG . esc_html__(
160160
'Initial Amount',
161-
'gravityforms'
161+
'gravityformspayfast'
162162
) . GFPayFast::H6_TAG_END . esc_html__(
163-
"Select which field determines the initial payment amount, or select 'Form Total' to use the total of all pricing fields as the recurring amount.",
164-
'gravityforms'
165-
),
163+
"Select which field determines the initial payment amount, or select 'Form Total' to use the total of all pricing fields as the recurring amount.",
164+
'gravityformspayfast'
165+
),
166166
);
167167
}
168168

169169
public function recurring_amount_choices()
170170
{
171171
$form = $this->get_current_form();
172172
$recurring_choices = $this->get_payment_choices($form);
173-
$recurring_choices[] = array('label' => esc_html__('Form Total', 'gravityforms'), 'value' => 'form_total');
173+
$recurring_choices[] = array(
174+
'label' => esc_html__('Form Total', 'gravityformspayfast'),
175+
'value' => 'form_total'
176+
);
174177

175178
return $recurring_choices;
176179
}
@@ -184,31 +187,32 @@ public function getPayfastConfigurationInstructions(): array
184187
{
185188
$description = '
186189
<p style="text-align: left;">' .
187-
sprintf(
188-
__(
189-
'You will need a Payfast account in order to use the Payfast Add-On. Navigate to %sPayfast%s to register.',
190-
'gravityformspayfast'
191-
),
192-
'<a href="https://payfast.io" target="_blank">',
193-
'</a>'
194-
) .
195-
'</p>
190+
sprintf(
191+
// translators: %1$s and %2$s are the opening and closing <a> tags for the Payfast link.
192+
__(
193+
'You will need a Payfast account in order to use the Payfast Add-On. Navigate to %1$sPayfast%2$s to register.',
194+
'gravityformspayfast'
195+
),
196+
'<a href="https://payfast.io" target="_blank">',
197+
'</a>'
198+
) .
199+
'</p>
196200
<ul>
197201
<li>' . __(
198-
'The Payfast settings are configured per form. Navigate to \'Forms\' -> select \'Settings\' for the form, and select the \'Payfast\' tab.',
199-
'gravityformspayfast'
200-
) . '</li>' .
201-
'<li>' . __(
202-
'From there, click \'Add New\' to configure Payfast feed settings for the currently selected form.',
203-
'gravityformspayfast'
204-
) . '</li>' .
205-
'</ul>
202+
'The Payfast settings are configured per form. Navigate to \'Forms\' -> select \'Settings\' for the form, and select the \'Payfast\' tab.',
203+
'gravityformspayfast'
204+
) . '</li>' .
205+
'<li>' . __(
206+
'From there, click \'Add New\' to configure Payfast feed settings for the currently selected form.',
207+
'gravityformspayfast'
208+
) . '</li>' .
209+
'</ul>
206210
<p style="text-align: left;">' .
207-
__(
208-
'Enable \'Debug\' below to log the server-to-server communication between Payfast and your website, for each transaction. The log file for debugging can be found at /wp-content/plugins/gravityformspayfast/payfast.log. If activated, be sure to protect it by adding an .htaccess file in the same directory. If not, the file will be readable by anyone. ',
209-
'gravityformspayfast'
210-
) .
211-
'</p>';
211+
__(
212+
'Enable \'Debug\' below to log the server-to-server communication between Payfast and your website, for each transaction. The log file for debugging can be found at /wp-content/plugins/gravityformspayfast/payfast.log. If activated, be sure to protect it by adding an .htaccess file in the same directory. If not, the file will be readable by anyone. ',
213+
'gravityformspayfast'
214+
) .
215+
'</p>';
212216

213217
return array(
214218
array(
@@ -259,9 +263,9 @@ public function getCancelUrl(): array
259263
'Notifications',
260264
'gravityformspayfast'
261265
) . GFPayFast::H6_TAG_END . __(
262-
"Enable this option if you would like to only send out this form's notifications after payment has been received. Leaving this option disabled will send notifications immediately after the form is submitted.",
263-
'gravityformspayfast'
264-
)
266+
"Enable this option if you would like to only send out this form's notifications after payment has been received. Leaving this option disabled will send notifications immediately after the form is submitted.",
267+
'gravityformspayfast'
268+
)
265269
),
266270
);
267271
}

gravityformspayfast/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require": {
3-
"payfast/payfast-common": "v1.2.2"
3+
"payfast/payfast-common": "^1.4"
44
}
55
}

gravityformspayfast/composer.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gravityformspayfast/payfast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin Name: Gravity Forms Payfast Add-On
55
Plugin URI: https://github.com/Payfast/mod-gravityforms
66
Description: Integrates Gravity Forms with Payfast, a South African payment gateway.
7-
Version: 1.6.0
7+
Version: 1.7.0
88
Author: Payfast (Pty) Ltd
99
Author URI: https://payfast.io
1010
Text Domain: gravityformspayfast

gravityformspayfast/vendor/autoload.php

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,6 @@
22

33
// autoload.php @generated by Composer
44

5-
if (PHP_VERSION_ID < 50600) {
6-
if (!headers_sent()) {
7-
header('HTTP/1.1 500 Internal Server Error');
8-
}
9-
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running ' . PHP_VERSION . ', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.' . PHP_EOL;
10-
if (!ini_get('display_errors')) {
11-
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
12-
fwrite(STDERR, $err);
13-
} elseif (!headers_sent()) {
14-
echo $err;
15-
}
16-
}
17-
trigger_error(
18-
$err,
19-
E_USER_ERROR
20-
);
21-
}
22-
235
require_once __DIR__ . '/composer/autoload_real.php';
246

25-
return ComposerAutoloaderInit1b330ff27468c529ebbc764bd41fd09f::getLoader();
7+
return ComposerAutoloaderInitb6b97a770464b3229cda87d3ed167904::getLoader();

0 commit comments

Comments
 (0)