Skip to content

Commit

Permalink
Release v8.0.0
Browse files Browse the repository at this point in the history
* [ADD] Checkout v4 as primary version.
* [DEL] Developer options for previous checkout versions.
  • Loading branch information
alexhernandezord authored Feb 26, 2024
1 parent b53f3bc commit fd87126
Show file tree
Hide file tree
Showing 73 changed files with 121 additions and 118 deletions.
19 changes: 19 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# review when someone opens a pull request.
# owner(s) will be requested for a review.
Jenkinsfile @aplazame/squad_devops-reviewers
DockerFile @aplazame/squad_devops-reviewers
CODEOWNERS @aplazame/squad_devops-reviewers
jenkins/ @aplazame/squad_devops-reviewers
docker/DockerFile @aplazame/squad_devops-reviewers
Makefile @aplazame/squad_devops-reviewers
makefile @aplazame/squad_devops-reviewers
node.yaml @aplazame/squad_devops-reviewers
deploy.yaml @aplazame/squad_devops-reviewers
build_dependencies.yaml @aplazame/squad_devops-reviewers
build.yaml @aplazame/squad_devops-reviewers
Dockerfile @aplazame/squad_devops-reviewers
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Change Log

#### [v8.0.0](https://github.com/aplazame/prestashop/tree/v8.0.0) (2024-02-26)

* [ADD] Checkout v4 as primary version.
* [DEL] Developer options for previous checkout versions.

#### [v7.9.2](https://github.com/aplazame/prestashop/tree/v7.9.2) (2023-09-20)

* [ADD] Developer options for checkout v4 API tests.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2023, Aplazame
Copyright (c) 2024, Aplazame
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version ?= v7.9.2
version ?= v8.0.0
errors = $(shell find aplazame -type f -name "*.php" -exec php -l "{}" \;| grep "Errors parsing ";)

syntax.checker:
Expand Down
2 changes: 1 addition & 1 deletion aplazame/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2023, Aplazame
Copyright (c) 2024, Aplazame
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
52 changes: 4 additions & 48 deletions aplazame/aplazame.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down Expand Up @@ -46,7 +46,7 @@ public function __construct()
{
$this->name = 'aplazame';
$this->tab = 'payments_gateways';
$this->version = '7.9.2';
$this->version = '8.0.0';
$this->author = 'Aplazame SL';
$this->author_uri = 'https://aplazame.com';
$this->module_key = '64b13ea3527b4df3fe2e3fc1526ce515';
Expand Down Expand Up @@ -133,11 +133,6 @@ public function install()
Configuration::updateValue('CART_WIDGET_ALIGN', 'center');
Configuration::updateValue('CART_WIDGET_MAX_DESIRED', false);

/**
* Developer settings.
*/
Configuration::updateValue('APLAZAME_V4', false);

return ($this->registerHook('actionOrderSlipAdd')
&& $this->registerHook('actionOrderStatusUpdate')
&& $this->registerHook('displayAdminProductsExtra')
Expand Down Expand Up @@ -281,7 +276,6 @@ public function getContent()
'APLAZAME_PRODUCT_CSS',
'APLAZAME_CART_CSS',
'APLAZAME_WIDGET_OUT_OF_LIMITS',
'APLAZAME_V4',
'WIDGET_LEGACY',
'PRODUCT_WIDGET_BORDER',
'PRODUCT_WIDGET_PRIMARY_COLOR',
Expand Down Expand Up @@ -903,38 +897,6 @@ protected function getConfigForm()
),
);

/**
* Developer settings form.
*/
$dev_settings =
array(
'form' => array(
'legend' => array(
'title' => $this->l('Developer Settings (WARNING: DO NOT TOUCH IF NOT NECESSARY)'),
'icon' => 'icon-cogs',
),
'input' => array(
array(
'type' => $switch_or_radio,
'label' => $this->l('Use v4 checkout API'),
'name' => 'APLAZAME_V4',
'is_bool' => true,
'desc' => $this->l('API version'),
'values' => array(
array(
'id' => 'active_on',
'value' => true,
),
array(
'id' => 'active_off',
'value' => false,
),
),
),
),
),
);

/**
* Save button.
*/
Expand All @@ -946,7 +908,6 @@ protected function getConfigForm()
$form[] = $product_widget;
$form[] = $cart_widget;
$form[] = $button;
$form[] = $dev_settings;

return $form;
}
Expand Down Expand Up @@ -1338,16 +1299,11 @@ public function captureOrder(Order $order)
*
* @throws Exception
*/
public function createCheckoutOnAplazame(Cart $cart)
public function createCheckoutOnAplazame(Cart $cart, $apiVersion)
{
$checkout = Aplazame_Aplazame_BusinessModel_Checkout::createFromCart($cart, (int) $this->id, $this->currentOrder);

return $this->callToRest(
'POST',
'/checkout',
Aplazame_Sdk_Serializer_JsonSerializer::serializeValue($checkout),
Configuration::get('APLAZAME_V4') ? 4 : 3
);
return $this->callToRest('POST', '/checkout', Aplazame_Sdk_Serializer_JsonSerializer::serializeValue($checkout), $apiVersion);
}

private function registerController($className, $name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/controllers/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/controllers/front/Api/article.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/controllers/front/Api/confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/controllers/front/Api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/controllers/front/Api/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/controllers/front/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/controllers/front/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
8 changes: 6 additions & 2 deletions aplazame/controllers/front/redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand All @@ -20,7 +20,11 @@ public function postProcess()
}

try {
$payload = $this->module->createCheckoutOnAplazame($cart);
try {
$payload = $this->module->createCheckoutOnAplazame($cart, 4);
} catch (Exception $e) {
$payload = $this->module->createCheckoutOnAplazame($cart, 3);
}
} catch (Aplazame_Sdk_Api_ApiClientException $e) {
$this->errors[] = 'Aplazame Error: ' . $e->getMessage();

Expand Down
2 changes: 1 addition & 1 deletion aplazame/controllers/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/Api/BusinessModel/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/Api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/BusinessModel/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/BusinessModel/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/BusinessModel/Checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/BusinessModel/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/BusinessModel/Meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/BusinessModel/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/BusinessModel/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Aplazame/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
2 changes: 1 addition & 1 deletion aplazame/lib/Aplazame/Sdk/Api/ApiClientException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file is part of the official Aplazame module for PrestaShop.
*
* @author Aplazame <[email protected]>
* @copyright 2015-2023 Aplazame
* @copyright 2015-2024 Aplazame
* @license see file: LICENSE
*/

Expand Down
Loading

0 comments on commit fd87126

Please sign in to comment.