Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit 0799bde

Browse files
committed
Release 1.0.4
1 parent 5a5ada2 commit 0799bde

22 files changed

+2506
-24
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This repository contains the OpenCart wallee payment module that enables the sh
1111

1212
## Documentation
1313

14-
* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.0/1.0.3/docs/en/documentation.html)
14+
* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.0/1.0.4/docs/en/documentation.html)
1515

1616
## License
1717

18-
Please see the [license file](https://github.com/wallee-payment/opencart-2.0/blob/1.0.3/LICENSE) for more information.
18+
Please see the [license file](https://github.com/wallee-payment/opencart-2.0/blob/1.0.4/LICENSE) for more information.

docs/en/documentation.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2>Documentation</h2> </div>
2121
</a>
2222
</li>
2323
<li>
24-
<a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.3/">
24+
<a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.4/">
2525
Source
2626
</a>
2727
</li>
@@ -37,7 +37,7 @@ <h1>
3737
</div>
3838
<div class="chapter-body">
3939
<div class="paragraph">
40-
<p>If you don&#8217;t already have one, create a <a href="https://www.wallee.com/">wallee</a> account and set up a space by following the setup assistant.</p>
40+
<p>If you don&#8217;t already have one, create a <a href="https://www.wallee.com/">wallee</a> account.</p>
4141
</div> </div>
4242
</div> <div class="chapter" id="_installation">
4343
<div class="chapter-title">
@@ -54,7 +54,7 @@ <h2>
5454
<div class="olist arabic">
5555
<ol class="arabic">
5656
<li>
57-
<p><a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.3/">Download</a> the extension (wallee.zip).</p>
57+
<p><a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.4/">Download</a> the extension (wallee.zip).</p>
5858
</li>
5959
<li>
6060
<p>Extract the files and upload the content of the 'upload' directory to your store&#8217;s root directory using FTP/SSH.</p>
@@ -73,7 +73,7 @@ <h2>
7373
<div class="olist arabic">
7474
<ol class="arabic">
7575
<li>
76-
<p><a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.3/">Download</a> the extension (wallee.ocmod.zip). TODO</p>
76+
<p><a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.4/">Download</a> the extension (wallee.ocmod.zip). TODO</p>
7777
</li>
7878
<li>
7979
<p>Navigate to Extensions &#8594; Extension Installer, and upload the previously downloaded zip file.</p>

upload/system/library/wallee/wallee-sdk/README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ composer require wallee/sdk
3030

3131
### Manual Installation
3232

33-
Alternatively you can download the package in its entirety. The [Releases](/releases) page lists all stable versions.
33+
Alternatively you can download the package in its entirety. The [Releases](../../releases) page lists all stable versions.
3434

3535
Uncompress the zip file you download, and include the autoloader in your project:
3636

@@ -46,25 +46,30 @@ require_once '/path/to/php-sdk/autoload.php';
4646
<?php
4747
require_once(__DIR__ . '/autoload.php');
4848

49-
5049
// Setup API client
5150
$client = new \Wallee\Sdk\ApiClient('YOUR_USER_ID', 'YOUR_API_KEY');
5251

5352
// Create API service instance
54-
$service = new \Wallee\Sdk\Service\AccountService($apiClient);
55-
// The filter which restricts the entities which are used to calculate the count.
53+
$service = new \Wallee\Sdk\Service\SpaceService($client);
54+
55+
// The query restricts the spaces which are returned by the search.
5656
$filter = new \Wallee\Sdk\Model\EntityQueryFilter();
57+
$filter->setType(\Wallee\Sdk\Model\EntityQueryFilterType::LEAF);
58+
$filter->setOperator(\Wallee\Sdk\Model\CriteriaOperator::EQUALS);
59+
$filter->setFieldName('state');
60+
$filter->setValue(\Wallee\Sdk\Model\CreationEntityState::ACTIVE);
61+
62+
$query = new \Wallee\Sdk\Model\EntityQuery();
63+
$query->setFilter($filter);
5764

5865
try {
59-
$result = $apiService->count($filter);
66+
$result = $service->search($query);
6067
print_r($result);
6168
} catch (Exception $e) {
62-
echo 'Exception when calling AccountService->count: ', $e->getMessage(), PHP_EOL;
69+
echo 'Exception when calling SpaceService->search: ', $e->getMessage(), PHP_EOL;
6370
}
64-
65-
?>
6671
```
6772

6873
## License
6974

70-
Please see the [license file](/blob/master/LICENSE) for more information.
75+
Please see the [license file](LICENSE) for more information.

upload/system/library/wallee/wallee-sdk/lib/Http/SocketHttpClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,17 @@ private function createSocketStream(ApiClient $apiClient, HttpRequest $request)
299299
if ($proxyUrl !== null) {
300300
$host = parse_url($proxyUrl, PHP_URL_HOST);
301301
$port = parse_url($proxyUrl, PHP_URL_PORT);
302+
if(empty($port)){
303+
throw new ConnectionException($request->getUrl(), $request->getLogToken(), "The Proxy URL must contain a port number.");
304+
}
305+
302306
} else {
303307
$host = ($request->isSecureConnection() ? $this->getSslProtocol() . '://' : '') . $request->getHost();
304308
$port = $request->getPort();
305-
}
309+
if(empty($port)){
310+
$port = $request->isSecureConnection() ? 443 : 80;
311+
}
312+
}
306313
$socket = $host . ':' . $port;
307314

308315
$filePointer = @stream_socket_client($socket, $errno, $errstr, $apiClient->getConnectionTimeout(), STREAM_CLIENT_CONNECT,
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
<?php
2+
/**
3+
* wallee SDK
4+
*
5+
* This library allows to interact with the wallee payment service.
6+
* wallee SDK: 1.0.0
7+
*
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*/
21+
22+
namespace Wallee\Sdk\Model;
23+
24+
use Wallee\Sdk\ValidationException;
25+
26+
/**
27+
* AbstractSubscriptionAffiliateUpdate model
28+
*
29+
* @category Class
30+
* @package Wallee\Sdk
31+
* @author customweb GmbH
32+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
33+
*/
34+
class AbstractSubscriptionAffiliateUpdate {
35+
36+
/**
37+
* The original name of the model.
38+
*
39+
* @var string
40+
*/
41+
private static $swaggerModelName = 'Abstract.SubscriptionAffiliate.Update';
42+
43+
/**
44+
* An array of property to type mappings. Used for (de)serialization.
45+
*
46+
* @var string[]
47+
*/
48+
private static $swaggerTypes = array(
49+
'language' => 'string',
50+
'metaData' => 'map[string,string]',
51+
'name' => 'string',
52+
'state' => '\Wallee\Sdk\Model\CreationEntityState' );
53+
54+
/**
55+
* Returns an array of property to type mappings.
56+
*
57+
* @return string[]
58+
*/
59+
public static function swaggerTypes() {
60+
return self::$swaggerTypes;
61+
}
62+
63+
64+
65+
/**
66+
*
67+
*
68+
* @var string
69+
*/
70+
private $language;
71+
72+
/**
73+
* Meta data allow to store additional data along the object.
74+
*
75+
* @var map[string,string]
76+
*/
77+
private $metaData;
78+
79+
/**
80+
*
81+
*
82+
* @var string
83+
*/
84+
private $name;
85+
86+
/**
87+
*
88+
*
89+
* @var \Wallee\Sdk\Model\CreationEntityState
90+
*/
91+
private $state;
92+
93+
94+
/**
95+
* Constructor.
96+
*
97+
* @param mixed[] $data an associated array of property values initializing the model
98+
*/
99+
public function __construct(array $data = null) {
100+
if (isset($data['language'])) {
101+
$this->setLanguage($data['language']);
102+
}
103+
if (isset($data['metaData'])) {
104+
$this->setMetaData($data['metaData']);
105+
}
106+
if (isset($data['name'])) {
107+
$this->setName($data['name']);
108+
}
109+
if (isset($data['state'])) {
110+
$this->setState($data['state']);
111+
}
112+
}
113+
114+
115+
/**
116+
* Returns language.
117+
*
118+
*
119+
*
120+
* @return string
121+
*/
122+
public function getLanguage() {
123+
return $this->language;
124+
}
125+
126+
/**
127+
* Sets language.
128+
*
129+
* @param string $language
130+
* @return AbstractSubscriptionAffiliateUpdate
131+
*/
132+
public function setLanguage($language) {
133+
$this->language = $language;
134+
135+
return $this;
136+
}
137+
138+
/**
139+
* Returns metaData.
140+
*
141+
* Meta data allow to store additional data along the object.
142+
*
143+
* @return map[string,string]
144+
*/
145+
public function getMetaData() {
146+
return $this->metaData;
147+
}
148+
149+
/**
150+
* Sets metaData.
151+
*
152+
* @param map[string,string] $metaData
153+
* @return AbstractSubscriptionAffiliateUpdate
154+
*/
155+
public function setMetaData($metaData) {
156+
$this->metaData = $metaData;
157+
158+
return $this;
159+
}
160+
161+
/**
162+
* Returns name.
163+
*
164+
*
165+
*
166+
* @return string
167+
*/
168+
public function getName() {
169+
return $this->name;
170+
}
171+
172+
/**
173+
* Sets name.
174+
*
175+
* @param string $name
176+
* @return AbstractSubscriptionAffiliateUpdate
177+
*/
178+
public function setName($name) {
179+
$this->name = $name;
180+
181+
return $this;
182+
}
183+
184+
/**
185+
* Returns state.
186+
*
187+
*
188+
*
189+
* @return \Wallee\Sdk\Model\CreationEntityState
190+
*/
191+
public function getState() {
192+
return $this->state;
193+
}
194+
195+
/**
196+
* Sets state.
197+
*
198+
* @param \Wallee\Sdk\Model\CreationEntityState $state
199+
* @return AbstractSubscriptionAffiliateUpdate
200+
*/
201+
public function setState($state) {
202+
$this->state = $state;
203+
204+
return $this;
205+
}
206+
207+
/**
208+
* Validates the model's properties and throws a ValidationException if the validation fails.
209+
*
210+
* @throws ValidationException
211+
*/
212+
public function validate() {
213+
214+
}
215+
216+
/**
217+
* Returns true if all the properties in the model are valid.
218+
*
219+
* @return boolean
220+
*/
221+
public function isValid() {
222+
try {
223+
$this->validate();
224+
return true;
225+
} catch (ValidationException $e) {
226+
return false;
227+
}
228+
}
229+
230+
/**
231+
* Returns the string presentation of the object.
232+
*
233+
* @return string
234+
*/
235+
public function __toString() {
236+
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
237+
return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
238+
}
239+
240+
return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this));
241+
}
242+
243+
}
244+

0 commit comments

Comments
 (0)