Skip to content

Commit

Permalink
V1.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Webtica committed Jan 24, 2022
1 parent aa248ab commit 0de1615
Show file tree
Hide file tree
Showing 20 changed files with 450 additions and 32 deletions.
Binary file modified .DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ Yes, all the other form widget integrations will be available.

## Changelog

### 1.2.0 - 24-01-2022
* Added support link
* Update composer libaries
* Tested Elementor PRO up to 3.5.2
* Tested Elementor up to 3.5.4
* Tested WordPress up to 5.9

### 1.1.0 - 17-11-2021
* Update composer libaries
* Tested Elementor PRO up to 3.5.1
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": {
"mollie/mollie-api-php": "^2.37"
"mollie/mollie-api-php": "^2.39"
}
}
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions includes/settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

// Link to support and pro page from plugins screen
function webtica_mollie_integration_filter_action_links( $links ) {

$links['support'] = '<a href="https://plugins.webtica.be/support/?ref=plugin-settings-page" target="_blank">Support</a>';
return $links;

}
add_filter( 'plugin_action_links_integration-for-elementor-forms-mollie/mollie-elementor-integration.php', 'webtica_mollie_integration_filter_action_links', 10, 3 );
7 changes: 4 additions & 3 deletions mollie-elementor-integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* Description: Easily create payments with Mollie after an elementor form submission.
* Author: Webtica
* Author URI: https://webtica.be/
* Version: 1.1.0
* Elementor tested up to: 3.4.7
* Elementor Pro tested up to: 3.5.1
* Version: 1.2.0
* Elementor tested up to: 3.5.4
* Elementor Pro tested up to: 3.5.2
*/

// Exit if accessed directly
Expand All @@ -17,6 +17,7 @@

//load plugins functionallity
require dirname(__FILE__).'/init-mollie-integration-action.php';
require dirname(__FILE__).'/includes/settings.php';

//Load mollie libary
require_once(plugin_dir_path(__FILE__) . '/vendor/autoload.php');
Expand Down
13 changes: 10 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== Integration for Elementor forms - Mollie ===
Contributors: webtica
Tags: sendinblue, elementor, elementor pro, forms, integration, marketing, lists, send, blue, automation
Tags: mollie, elementor, elementor pro, forms, integration, marketing, lists, payments, automation
Requires at least: 5.0
Tested up to: 5.8.2
Tested up to: 5.9
Requires PHP: 5.4
Stable tag: 1.1.0
Stable tag: 1.2.0
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -50,6 +50,13 @@ Yes, all the other form widget integrations will be available.

== Changelog ==

= 1.2.0 - 2022-01-24 =
* Added support link
* Update composer libaries
* Tested Elementor PRO up to 3.5.2
* Tested Elementor up to 3.5.4
* Tested WordPress up to 5.9

= 1.1.0 - 2021-11-17 =
* Update composer libaries
* Tested Elementor PRO up to 3.5.1
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function getFallbackDirsPsr4()

/**
* @return string[] Array of classname => path
* @psalm-var array<string, string>
* @psalm-return array<string, string>
*/
public function getClassMap()
{
Expand Down
14 changes: 7 additions & 7 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@
},
{
"name": "mollie/mollie-api-php",
"version": "v2.39.0",
"version_normalized": "2.39.0.0",
"version": "v2.40.1",
"version_normalized": "2.40.1.0",
"source": {
"type": "git",
"url": "https://github.com/mollie/mollie-api-php.git",
"reference": "a47d4449973c83e918db39f860b5e9076aeb367d"
"reference": "b99ad3662b4141efa9ee8eb83a04c2d3c100f83c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/a47d4449973c83e918db39f860b5e9076aeb367d",
"reference": "a47d4449973c83e918db39f860b5e9076aeb367d",
"url": "https://api.github.com/repos/mollie/mollie-api-php/zipball/b99ad3662b4141efa9ee8eb83a04c2d3c100f83c",
"reference": "b99ad3662b4141efa9ee8eb83a04c2d3c100f83c",
"shasum": ""
},
"require": {
Expand All @@ -110,7 +110,7 @@
"suggest": {
"mollie/oauth2-mollie-php": "Use OAuth to authenticate with the Mollie API. This is needed for some endpoints. Visit https://docs.mollie.com/ for more information."
},
"time": "2021-11-01T09:29:49+00:00",
"time": "2022-01-18T18:16:13+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -169,7 +169,7 @@
],
"support": {
"issues": "https://github.com/mollie/mollie-api-php/issues",
"source": "https://github.com/mollie/mollie-api-php/tree/v2.39.0"
"source": "https://github.com/mollie/mollie-api-php/tree/v2.40.1"
},
"install-path": "../mollie/mollie-api-php"
}
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '2208e7a4c20155a79b3769bb4ea7d67065637a77',
'reference' => 'aa248abd3dc49bb1c85318904e50ad3418e6b9b6',
'name' => '__root__',
'dev' => true,
),
Expand All @@ -16,7 +16,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '2208e7a4c20155a79b3769bb4ea7d67065637a77',
'reference' => 'aa248abd3dc49bb1c85318904e50ad3418e6b9b6',
'dev_requirement' => false,
),
'composer/ca-bundle' => array(
Expand All @@ -29,12 +29,12 @@
'dev_requirement' => false,
),
'mollie/mollie-api-php' => array(
'pretty_version' => 'v2.39.0',
'version' => '2.39.0.0',
'pretty_version' => 'v2.40.1',
'version' => '2.40.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../mollie/mollie-api-php',
'aliases' => array(),
'reference' => 'a47d4449973c83e918db39f860b5e9076aeb367d',
'reference' => 'b99ad3662b4141efa9ee8eb83a04c2d3c100f83c',
'dev_requirement' => false,
),
),
Expand Down
31 changes: 31 additions & 0 deletions vendor/mollie/mollie-api-php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,37 @@ $refund = $payment->refund([

For a working example, see [Example - Refund payment](https://github.com/mollie/mollie-api-php/blob/master/examples/payments/refund-payment.php).

## Enabling debug mode

When debugging it can be convenient to have the submitted request available on the `ApiException`.

In order to prevent leaking sensitive request data into your local application logs, debugging is disabled by default.

To enable debugging and inspect the request:

```php
/** @var $mollie \Mollie\Api\MollieApiClient */
$mollie->enableDebugging();

try {
$mollie->payments->get('tr_12345678');
} catch (\Mollie\Api\Exceptions\ApiException $exception) {
$request = $exception->getRequest();
}
```

If you're logging the `ApiException`, the request will also be logged. Make sure to not retain any sensitive data in
these logs and clean up after debugging.

To disable debugging again:

```php
/** @var $mollie \Mollie\Api\MollieApiClient */
$mollie->disableDebugging();
```

Note that debugging is only available when using the default Guzzle http adapter (`Guzzle6And7MollieHttpAdapter`).

## API documentation ##
If you wish to learn more about our API, please visit the [Mollie Developer Portal](https://www.mollie.com/developers). API Documentation is available in English.

Expand Down
69 changes: 69 additions & 0 deletions vendor/mollie/mollie-api-php/src/Endpoints/ClientEndpoint.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php

namespace Mollie\Api\Endpoints;

use Mollie\Api\Exceptions\ApiException;
use Mollie\Api\Resources\Client;
use Mollie\Api\Resources\ClientCollection;

class ClientEndpoint extends CollectionEndpointAbstract
{
protected $resourcePath = "clients";

/**
* @return Client
*/
protected function getResourceObject()
{
return new Client($this->client);
}

/**
* Get the collection object that is used by this API endpoint. Every API endpoint uses one type of collection object.
*
* @param int $count
* @param \stdClass $_links
*
* @return ClientCollection
*/
protected function getResourceCollectionObject($count, $_links)
{
return new ClientCollection($this->client, $count, $_links);
}

/**
* Retrieve a client from Mollie.
*
* Will throw an ApiException if the client id is invalid or the resource cannot be found.
* The client id corresponds to the organization id, for example "org_1337".
*
* @param string $clientId
* @param array $parameters
*
* @return Client
* @throws ApiException
*/
public function get($clientId, array $parameters = [])
{
if (empty($clientId)) {
throw new ApiException("Client ID is empty.");
}

return parent::rest_read($clientId, $parameters);
}

/**
* Retrieves a page of clients from Mollie.
*
* @param string $from The first client ID you want to include in your list.
* @param int $limit
* @param array $parameters
*
* @return ClientCollection
* @throws ApiException
*/
public function page($from = null, $limit = null, array $parameters = [])
{
return $this->rest_list($from, $limit, $parameters);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php

namespace Mollie\Api\Endpoints;

use Mollie\Api\Exceptions\ApiException;
use Mollie\Api\Resources\BaseResource;
use Mollie\Api\Resources\Partner;
use Mollie\Api\Resources\ResourceFactory;

class OrganizationPartnerEndpoint extends EndpointAbstract
{
protected $resourcePath = "organizations/me/partner";

protected function getResourceCollectionObject($count, $links)
{
throw new \BadMethodCallException('not implemented');
}

/**
* Get the object that is used by this API endpoint. Every API endpoint uses one type of object.
*
* @return BaseResource
*/
protected function getResourceObject()
{
return new Partner($this->client);
}

/**
* Retrieve details about the partner status of the currently authenticated organization.
*
* Will throw an ApiException if the resource cannot be found.
*
* @return Partner
* @throws ApiException
*/
public function get()
{
return $this->rest_read('', []);
}

/**
* @param string $id
* @param array $filters
*
* @return \Mollie\Api\Resources\BaseResource
* @throws \Mollie\Api\Exceptions\ApiException
*/
protected function rest_read($id, array $filters)
{
$result = $this->client->performHttpCall(
self::REST_READ,
$this->getResourcePath() . $this->buildQueryString($filters)
);

return ResourceFactory::createFromApiResult($result, $this->getResourceObject());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Mollie\Api\Exceptions;

class HttpAdapterDoesNotSupportDebuggingException extends ApiException
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class CurlMollieHttpAdapter implements MollieHttpAdapterInterface
* @param string $url
* @param array $headers
* @param $httpBody
* @return \stdClass|void|null
* @return \stdClass|null
* @throws \Mollie\Api\Exceptions\ApiException
*/
public function send($httpMethod, $url, $headers, $httpBody)
Expand Down
Loading

0 comments on commit 0de1615

Please sign in to comment.