Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Compatibility: Compatible with PHP 8.1 & PrestaShop 8.2.x (tested with v8.2.0), Implemented a feature to enable/disable the transmission of line items to the payment gateway. #5

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.4.4] - 2025-01-28
### Added
- Enhanced Compatibility: Compatible with PHP 8.1 & PrestaShop 8.2.x (tested with v8.2.0).
- Implemented a feature to enable/disable the transmission of line items to the payment gateway.
- As part of plugin analytics, the plugin will start capturing download count from GitHub and the active installation count. The Active count, Store Name, Store URL, and the Country configured in the PrestaShop Admin page will be captured once the Live Private Key and Public Key are saved in the configuration page.

### Fixed
- Minor bug fixes.

## [2.4.3] - 2024-10-04
### Added
- Implemented a feature to enable or disable debug logging. All communication data is encrypted and stored in a log file.
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ The Simplify Commerce module is not bundled in the PrestaShop download.

The latest release of the plugin has the following system requirements:

- PHP version 8.0 or higher is mandatory.
- PrestaShop version 8.0.4 or later is required. However, we strongly recommend using the latest available version of PrestaShop for optimal performance.
- PHP version 8.1.
- PrestaShop version 8.2.0 or later is required. However, we strongly recommend using the latest available version of PrestaShop for optimal performance.

## Documentation

Expand Down Expand Up @@ -67,6 +67,12 @@ Version v2.4.3
- Implemented a feature to enable or disable debug logging. All communication data is encrypted and stored in a log file.
- Added void details to the order page.

Version v2.4.4
- Enhanced Compatibility: Compatible with PHP 8.1 & PrestaShop 8.2.x (tested with v8.2.0).
- Implemented a feature to enable/disable the transmission of line items to the payment gateway.
- As part of plugin analytics, the plugin will start capturing download count from GitHub and the active installation count. The Active count, Store Name, Store URL, and the Country configured in the PrestaShop Admin page will be captured once the Live Private Key and Public Key are saved in the configuration page.
- Minor bug fixes.

## Installation
1. Make a backup of your site before applying new mods etc.
2. Download the .zip file of the latest release of the extension from https://github.com/simplifycom/simplify-prestashop-module/releases/latest
Expand All @@ -89,10 +95,14 @@ Please proceed with the following actions to configure the payment method:
11. If multiple Payment Providers are used, adjust the Sort Order to determine their display sequence on the checkout form.
12. Option to choose Button color: Please select your preferred color from the options provided.
13. Enable/Disable the option to log data into ./var/logs/mastercard_simplify.log. All communications with the Simplify Mastercard Gateway are securely encrypted. You can also download the decrypted log file directly from the plugin configuration page.
14. Remember to enable the extension to activate the changes.
14. Enable/Disable this option to send the additional data to the Mastercard Gateway.
15. Remember to enable the extension to activate the changes.

![Configuration](docs/images/configuration.png "Configuration")

## Disclaimer!
Starting from version 2.4.4, the plugin will collect analytics data, including the plugin download count from GitHub and the active installation count. The Active count, Store Name, Store URL, and the Country configured in the PrestaShop Admin page will be captured once the Live Private Key and Public Key are saved in the configuration page.

## Transaction Mode

### Payment
Expand Down
2 changes: 1 addition & 1 deletion composer.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Mastercard Payment Gateway Services - Simplify",
"homepage": "https://github.com/Mastercard-Gateway/simplify-prestashop-module",
"license": "Apache-2.0",
"version": "2.4.3",
"version": "2.4.4",
"authors": [
{
"name": "Mastercard",
Expand Down
398 changes: 202 additions & 196 deletions controllers/admin/AdminSimplifyController.php

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions controllers/front/index.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?php
/**
* Copyright (c) 2017-2023 Mastercard
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
8 changes: 4 additions & 4 deletions controllers/index.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?php
/**
* Copyright (c) 2017-2023 Mastercard
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");

Expand Down
Binary file modified docs/images/configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/Simplify.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/AccessToken.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Authentication.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Authorization.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/CardToken.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Constants.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Coupon.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Customer.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Event.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Exceptions.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/FraudCheck.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Http.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Invoice.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/InvoiceItem.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Object.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Payment.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/PaymentsApi.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Plan.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Refund.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/ResourceList.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Subscription.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Tax.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/TransactionReview.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
2 changes: 1 addition & 1 deletion lib/Simplify/Webhook.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2013 - 2023 MasterCard International Incorporated
* Copyright (c) 2013 - 2024 MasterCard International Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
Expand Down
8 changes: 4 additions & 4 deletions lib/index.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php
/**
* Copyright (c) 2017-2023 Mastercard
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
*/
6 changes: 3 additions & 3 deletions payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
*
*/

include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/../../init.php');
include(dirname(__FILE__).'/simplifycommerce.php');
include_once(dirname(__FILE__).'/../../config/config.inc.php');
include_once(dirname(__FILE__).'/../../init.php');
include_once(dirname(__FILE__).'/simplifycommerce.php');

if (!defined('_PS_VERSION_')) {
exit;
Expand Down
Loading