Skip to content

Commit

Permalink
Merge pull request #42 from logeecom/dev
Browse files Browse the repository at this point in the history
Release version 3.2.4
  • Loading branch information
logeecom authored May 10, 2022
2 parents 6b4d2af + 2b14784 commit 4d79bf4
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 10 deletions.
Binary file added PluginInstallation/3.2.4/packlink.zip
Binary file not shown.
4 changes: 4 additions & 0 deletions PluginInstallation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [3.2.4](https://github.com/packlink-dev/prestashop_module/compare/v3.2.3...v3.2.4)
# Added
- Added carrier logos for Colis Prive and Shop2Shop shipping services.

## [3.2.3](https://github.com/packlink-dev/prestashop_module/compare/v3.2.2...v3.2.3)
# Changed
- Updated to the latest Core changes regarding changing the value of the marketing calls flag.
Expand Down
7 changes: 7 additions & 0 deletions src/classes/Utility/SystemInfoUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ protected static function getPrestaShopInfo()
$result['Plugin version'] = $packlink->version;
$result['Async process URL'] = $configService->getAsyncProcessUrl('test');
$result['Auto-test URL'] = \Context::getContext()->link->getAdminLink('PacklinkAutoTest');
$result['Test cURL URL'] = \Context::getContext()->link->getAdminLink('Debug') . '&' .
http_build_query(
array(
'ajax' => true,
'action' => 'testCurl',
)
);

return json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
}
Expand Down
4 changes: 2 additions & 2 deletions src/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "packlink/prestashop",
"description": "Packlink Shipping PrestaShop plugin",
"type": "library",
"version": "3.2.3",
"version": "3.2.4",
"repositories": [
{
"type": "vcs",
Expand All @@ -13,7 +13,7 @@
"minimum-stability": "dev",
"require": {
"php": ">=5.3",
"packlink/integration-core": "3.3.6",
"packlink/integration-core": "3.3.8",
"ext-json": "*",
"ext-curl": "*",
"ext-zip": "*",
Expand Down
14 changes: 7 additions & 7 deletions src/composer.lock

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

50 changes: 50 additions & 0 deletions src/controllers/admin/DebugController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use Logeecom\Infrastructure\ServiceRegister;
use Packlink\PrestaShop\Classes\Utility\PacklinkPrestaShopUtility;
use Packlink\PrestaShop\Classes\Utility\SystemInfoUtility;
use Packlink\BusinessLogic\Controllers\DebugController as BaseDebugController;
Expand Down Expand Up @@ -60,4 +61,53 @@ public function displayAjaxGetSystemInfo()

PacklinkPrestaShopUtility::dieFile($file, self::SYSTEM_INFO_FILE_NAME);
}

/**
* Tests cURL request to the async process controller.
*
* @return void
*/
public function displayAjaxTestCurl()
{
/** @var \Logeecom\Infrastructure\Configuration\Configuration $config */
$config = ServiceRegister::getService( \Logeecom\Infrastructure\Configuration\Configuration::CLASS_NAME );
$url = $config->getAsyncProcessUrl( 'test' );

$curl = curl_init();
$verbose = fopen( 'php://temp', 'wb+' );
/** @noinspection CurlSslServerSpoofingInspection */
curl_setopt_array(
$curl,
array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_HEADER => true,
// CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1_0,
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_TIMEOUT => 2,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_VERBOSE => true,
CURLOPT_STDERR => $verbose,
// CURLOPT_SSL_CIPHER_LIST => 'TLSv1.2',
CURLOPT_HTTPHEADER => array(
'Cache-Control: no-cache',
),
)
);

$response = curl_exec( $curl );

rewind( $verbose );
echo '<pre>', stream_get_contents( $verbose );

curl_close( $curl );

echo $response;

echo '</pre>';
exit;
}
}
2 changes: 1 addition & 1 deletion src/packlink.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct()
$this->module_key = 'a7a3a395043ca3a09d703f7d1c74a107';
$this->name = 'packlink';
$this->tab = 'shipping_logistics';
$this->version = '3.2.3';
$this->version = '3.2.4';
$this->author = $this->l('Packlink Shipping S.L.');
$this->need_instance = 0;
$this->ps_versions_compliancy = array('min' => '1.6.0.14', 'max' => _PS_VERSION_);
Expand Down

0 comments on commit 4d79bf4

Please sign in to comment.