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

Commit

Permalink
Release 1.0.55
Browse files Browse the repository at this point in the history
  • Loading branch information
victoralbala committed Mar 16, 2023
1 parent 03e28de commit 47fc974
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ This repository contains the OpenCart wallee payment module that enables the sh

## Documentation

* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.2/1.0.53/docs/en/documentation.html)
* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.2/1.0.55/docs/en/documentation.html)

## Support

Support queries can be issued on the [wallee support site](https://app-wallee.com/space/select?target=/support).

## License

Please see the [license file](https://github.com/wallee-payment/opencart-2.2/blob/1.0.53/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/opencart-2.2/blob/1.0.55/LICENSE) for more information.
4 changes: 2 additions & 2 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/wallee-payment/opencart-2.2/releases/tag/1.0.53/">
<a href="https://github.com/wallee-payment/opencart-2.2/releases/tag/1.0.55/">
Source
</a>
</li>
Expand All @@ -49,7 +49,7 @@ <h1>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><a href="https://github.com/wallee-payment/opencart-2.2/releases/tag/1.0.53/">Download</a> the extension.</p>
<p><a href="https://github.com/wallee-payment/opencart-2.2/releases/tag/1.0.55/">Download</a> the extension.</p>
</li>
<li>
<p>Extract the files and upload the content of the <code>Upload</code> directory into the root directory of your store using FTP/SSH.</p>
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/view/template/payment/wallee.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,14 @@
<div class="form-group">
<label class="col-sm-2 control-label"><?php echo $entry_version; ?></label>
<div class="col-sm-10">
<p class="form-control-static">1.0.53</p>
<p class="form-control-static">1.0.55</p>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label"><?php echo $entry_date; ?></label>
<div class="col-sm-10">
<p class="form-control-static">2022/11/29 17:28:39</p>
<p class="form-control-static">2023/03/16 15:16:37</p>
</div>
</div>
</fieldset>
Expand Down
31 changes: 18 additions & 13 deletions upload/catalog/controller/extension/wallee/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function includeCronScript(){
$security_token = \Wallee\Entity\Cron::getCurrentSecurityTokenForPendingCron($this->registry);
if ($security_token) {
$cronUrl = $this->createUrl('extension/wallee/cron', array(
'security_token' => $security_token
'security_token' => $security_token
));
$this->document->addScript($cronUrl . '" async="async');
}
Expand All @@ -51,10 +51,10 @@ public function includeDeviceIdentifier(){

$script = str_replace(array(
'[spaceId]',
'[UniqueSessionIdentifier]'
'[UniqueSessionIdentifier]'
), array(
$this->config->get('wallee_space_id'),
$this->request->cookie['wallee_device_id']
$this->request->cookie['wallee_device_id']
), $script);

// async hack
Expand All @@ -77,10 +77,15 @@ private function setDeviceCookie(){
* Prevent line item changes to authorized wallee transactions.
*
* @param string $route
* Not used in this scope but required by the caller.
* @param array $parameters
* @param object $output
*
* @see \Action::execute(), system/engine/action.php
*/
public function canSaveOrder(){
public function canSaveOrder(string $route, array $parameters) {
if (!(count($parameters) && is_numeric($parameters[0]))) {
return;
}
$order_id = $parameters[0];

$transaction_info = \Wallee\Entity\TransactionInfo::loadByOrderId($this->registry, $order_id);
Expand Down Expand Up @@ -114,7 +119,7 @@ public function canSaveOrder(){
$this->language->load('payment/wallee');
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode([
'error' => $this->language->get('error_order_edit')
'error' => $this->language->get('error_order_edit')
]));
$this->response->output();
die();
Expand Down Expand Up @@ -148,21 +153,21 @@ private function getNewOrderLineItemData(array $new_order){
foreach ($new_order['products'] as $product) {
$line_items[] = [
'id' => $product['product_id'],
'total' => $product['total']
'total' => $product['total']
];
}

foreach ($new_order['vouchers'] as $voucher) {
$line_items[] = [
'id' => $voucher['voucher_id'],
'total' => $voucher['price']
'total' => $voucher['price']
];
}

foreach ($new_order['totals'] as $total) {
$line_items[] = [
'id' => $total['code'],
'total' => $total['value']
'total' => $total['value']
];
}

Expand All @@ -182,21 +187,21 @@ private function getOldOrderLineItemData($order_id){
foreach ($model->getOrderProducts($order_id) as $product) {
$line_items[] = [
'id' => $product['product_id'],
'total' => $product['total']
'total' => $product['total']
];
}

foreach ($model->getOrderVouchers($order_id) as $voucher) {
$line_items[] = [
'id' => $voucher['voucher_id'],
'total' => $voucher['price']
'total' => $voucher['price']
];
}

foreach ($model->getOrderTotals($order_id) as $total) {
$line_items[] = [
'id' => $total['code'],
'total' => $total['value']
'total' => $total['value']
];
}

Expand All @@ -206,4 +211,4 @@ private function getOldOrderLineItemData($order_id){
protected function getRequiredPermission(){
return '';
}
}
}

0 comments on commit 47fc974

Please sign in to comment.