Skip to content

Commit

Permalink
Merge pull request #13 from appinlet/release/1.0.7
Browse files Browse the repository at this point in the history
= 1.0.7 - April 29, 2024 =
  • Loading branch information
appinlet authored Apr 29, 2024
2 parents 35f8202 + 5042398 commit b8794f3
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 29 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# DPO_Gravity_Forms
## DPO Pay plugin v1.0.6 for Gravity Forms v2.6.9, WordPress v6.1
## DPO Pay plugin v1.0.7 for Gravity Forms v2.8.8, WordPress v6.5.2

This is the DPO Pay plugin for Gravity Forms. Please feel free to contact the [DPO Pay support team](https://dpogroup.com/contact-us/) should you require any assistance.

## Installation
Please navigate to the [releases page](https://github.com/DPO-Group/DPO_Gravity_Forms/releases), download the latest release (v1.0.6) and unzip. You will then be able to follow the integration guide which is included in the zip.
Please navigate to the [releases page](https://github.com/DPO-Group/DPO_Gravity_Forms/releases), download the latest release (v1.0.7) and unzip. You will then be able to follow the integration guide which is included in the zip.

## Collaboration

Expand Down
9 changes: 7 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
= 1.0.7 - April 29, 2024 =
* Test WordPress 6.5.2 and Gravity Forms 2.8.8.
* Update for PHP 8.1.
* Bug fixes and improvements.

= 1.0.6 - March 3, 2023 =
* Improve error display to user.

= 1.0.5 - January 27, 2023 =
* Test Wordpress 6.1.1 and Gravity Forms 2.6.9.
* Test WordPress 6.1.1 and Gravity Forms 2.6.9.
* Add support for Payment Complete event.
* Bug fixes and improvements.

= 1.0.4 - October 12, 2022 =
* Test Wordpress 6.0 and Gravity Forms 2.6.7.
* Test WordPress 6.0 and Gravity Forms 2.6.7.
* Update for PHP 8.0.
* Bug fixes and improvements.

Expand Down
12 changes: 6 additions & 6 deletions class-gf-dpo-group.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2023 DPO Group
* Copyright (c) 2024 DPO Group
*
* Author: App Inlet (Pty) Ltd
*
Expand All @@ -24,7 +24,7 @@ class GF_DPO_Group extends GFPaymentAddOn
protected $_slug = 'gravity-forms-dpo-group-plugin';
protected $_path = 'gravity-forms-dpo-group-plugin/dpo-group.php';
protected $_full_path = __FILE__;
protected $_url = 'http://www.gravityforms.com';
protected $_url = 'https://www.gravityforms.com';
protected $_title = 'Gravity Forms DPO Pay Add-On';
protected $_short_title = 'DPO Pay';
// Permissions
Expand Down Expand Up @@ -578,7 +578,7 @@ public function field_map_title()

public function settings_trial_period($field, $echo = true)
{
// Use the parent billing cycle function to make the drop down for the number and type
// Use the parent billing cycle function to make the dropdown for the number and type
return parent::settings_billing_cycle($field);
}

Expand Down Expand Up @@ -780,7 +780,7 @@ public function redirect_url($feed, $submission_data, $form, $entry)
$reference = 'DPO_Group_Form_' . date('Y-m-d_H:i:s');

/**
* Setup the order info to pass to dpo_grouppay
* Set up the order info to pass to dpo_grouppay
*/
$data = [];
$data['companyToken'] = $dpo_grouppay->getCompanyToken();
Expand Down Expand Up @@ -1139,7 +1139,7 @@ public function get_entry($custom_field): bool
// Allow the user to do some other kind of validation of the hash
$hash_matches = apply_filters('gform_dpo_group_hash_matches', $hash_matches, $entry_id, $hash, $custom_field);

// Validates that Entry Id wasn't tampered with
// Validates that Entry ID wasn't tampered with
if ( ! rgpost('test_itn') && ! $hash_matches) {
$this->log_error(
__METHOD__ . "(): Entry Id verification failed. Hash does not match. Custom field: {$custom_field}. Aborting."
Expand Down Expand Up @@ -1923,7 +1923,7 @@ private function get_pending_reason($code)

private function is_valid_initial_payment_amount($entry_id, $amount_paid): bool
{
// Get amount initially sent to paypfast
// Get amount initially sent to DPO Pay
$amount_sent = gform_get_meta($entry_id, 'payment_amount');
if (empty($amount_sent)) {
return true;
Expand Down
8 changes: 4 additions & 4 deletions dpo-group.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
/**
* Plugin Name: Gravity Forms DPO Pay Add-On
* Plugin URI: https://github.com/DPO-Group/DPO_Gravity_Forms
* Description: Integrates Gravity Forms with DPO Pay, a An African payment gateway.
* Version: 1.0.6
* Description: Integrates Gravity Forms with DPO Pay, an African payment gateway.
* Version: 1.0.7
* Minimum Gravity Forms Version: 2.2.5
* Tested Gravity Forms Version: 2.6.9
* Tested Gravity Forms Version: 2.8.8
* Author: DPO Group
* Author URI: https://www.dpogroup.com/africa/
* Developer: App Inlet (Pty) Ltd
* Developer URI: https://www.appinlet.com/
* Text Domain: gravity-forms-dpo-group
* Domain Path: /languages
*
* Copyright: © 2023 DPO Group
* Copyright: © 2024 DPO Group
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
Expand Down
2 changes: 1 addition & 1 deletion includes/CountriesArray.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2023 DPO Group
* Copyright (c) 2024 DPO Group
*
* Author: App Inlet (Pty) Ltd
*
Expand Down
4 changes: 2 additions & 2 deletions includes/dpo-group-pay.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2023 DPO Group
* Copyright (c) 2024 DPO Group
*
* Author: App Inlet (Pty) Ltd
*
Expand Down Expand Up @@ -219,7 +219,7 @@ public function verifyToken($data): bool|array|string
$err = null;
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $this->dpo_groupUrl . "/API/v6/",
CURLOPT_URL => $this->dpo_groupUrl . "/API/v7/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
Expand Down
6 changes: 3 additions & 3 deletions includes/dpo-group-tools.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Copyright (c) 2023 DPO Group
* Copyright (c) 2024 DPO Group
*
* Author: App Inlet (Pty) Ltd
*
Expand Down Expand Up @@ -101,10 +101,10 @@ public function logData($msg = '', $close = false): void
/**
* Gravity Forms Post Content Merge Tags
*
* Adds support for using Gravity Form merge tags in your post content. This functionality requires that the entry ID is
* Adds support for using Gravity Form merge tags in your post content. This functionality requires that the entry ID
* is passed to the post via the "eid" parameter.
*
* Setup your confirmation page (requires GFv1.8) or confirmation URL "Redirect Query String" setting to
* Set up your confirmation page (requires GFv1.8) or confirmation URL "Redirect Query String" setting to
* include this parameter: 'eid={entry_id}'. You can then use any entry-based merge tag in your post content.
*
*/
Expand Down
20 changes: 11 additions & 9 deletions includes/updater.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class WP_GitHub_Updater_DPO_Group
public $missing_config;

/**
* temporiraly store the data fetched from GitHub, allows us to only load the data once per class instance
* temporarily store the data fetched from GitHub, allows us to only load the data once per class instance
* @access private
*/
private $github_data;
Expand Down Expand Up @@ -126,7 +126,7 @@ public function has_minimum_config()
}

/**
* Check wether or not the transients need to be overruled and API needs to be called for every single page load
* Check whether or not the transients need to be overruled and API needs to be called for every single page load
*
* @return bool overrule or not
*/
Expand Down Expand Up @@ -239,22 +239,22 @@ public function http_request_sslverify($args, $url)
*/
public function get_icons()
{
$assest_url = $this->config['raw_url'] . '/assets/images/';
$asset_url = $this->config['raw_url'] . '/assets/images/';

return array(
'default' => $assest_url . 'icon-128x128.png',
'1x' => $assest_url . 'icon-128x128.png',
'2x' => $assest_url . 'icon-256x256.png',
'default' => $asset_url . 'icon-128x128.png',
'1x' => $asset_url . 'icon-128x128.png',
'2x' => $asset_url . 'icon-256x256.png',
);
}

/**
* Get Raw Response from GitHub
*
* @return array|int $raw_response the raw response
* @return mixed $raw_response the raw response
* @since 1.7
*/
public function get_raw_response(): array|int
public function get_raw_response(): mixed
{
return $this->remote_get(trailingslashit($this->config['raw_url']) . basename($this->config['slug']));
}
Expand Down Expand Up @@ -527,12 +527,14 @@ public function get_plugin_info($response): bool|stdClass
* Upgrader/Updater
* Move & activate the plugin, echo the update message
*
* @param bool $true - don't remove, it breaks the updates
* @param mixed $hookExtra - don't remove, it breaks the updates
* @param array $result the result of the move
*
* @return array $result the result of the move
* @since 1.0
*/
public function upgrader_post_install(array $result): array
public function upgrader_post_install(bool $true, mixed $hookExtra, array $result): array
{
global $wp_filesystem;

Expand Down

0 comments on commit b8794f3

Please sign in to comment.