-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [ADD] Checkout v4 as primary version. * [DEL] Developer options for previous checkout versions.
- Loading branch information
1 parent
b53f3bc
commit fd87126
Showing
73 changed files
with
121 additions
and
118 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
@@ -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'; | ||
|
@@ -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') | ||
|
@@ -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', | ||
|
@@ -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. | ||
*/ | ||
|
@@ -946,7 +908,6 @@ protected function getConfigForm() | |
$form[] = $product_widget; | ||
$form[] = $cart_widget; | ||
$form[] = $button; | ||
$form[] = $dev_settings; | ||
|
||
return $form; | ||
} | ||
|
@@ -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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
@@ -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(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
||
|
Oops, something went wrong.