-
Notifications
You must be signed in to change notification settings - Fork 0
Sl 327 safer pay orders not sending email notifications when order status changes to shipped fixed #30
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
Closed
TLabutis
wants to merge
15
commits into
master
from
SL-327-safer-pay-orders-not-sending-email-notifications-when-order-status-changes-to-shipped-fixed
Closed
Sl 327 safer pay orders not sending email notifications when order status changes to shipped fixed #30
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
6c27891
[SL-312] init feature
MarijusDilys 8033f9e
[SL-312] fix
MarijusDilys 8326b18
[SL-312] add changelog
MarijusDilys 4b43672
[SL-323] init
MarijusDilys 1143f45
[SL-323] fix
MarijusDilys cac2068
Merge pull request #23 from Invertus/SL-323/config-order-conf
MarijusDilys 116386a
Merge branch 'release-v1.2.8' into SL-312/group-cards
MarijusDilys ee2e261
Merge pull request #22 from Invertus/SL-312/group-cards
MarijusDilys 4c79068
[SL-323] fix
MarijusDilys 8c381f6
Merge branch 'release-v1.2.8' into SL-323/config-order-conf
MarijusDilys ddcd029
Merge pull request #25 from Invertus/SL-323/config-order-conf
MarijusDilys 45978c6
init
MarijusDilys 6bab5e5
add logo
MarijusDilys faf9c40
Merge pull request #26 from Invertus/SL-312/cards-logo
MarijusDilys 8abe3ad
SL-327: Fix SaferPay orders not sending email notifications when orde…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -6,4 +6,5 @@ composer.lock | |
| tests/.env | ||
| /node_modules | ||
| var/cache/* | ||
| !var/cache/index.php | ||
| !var/cache/index.php | ||
| .DS_Store | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,72 @@ | ||
| <?php | ||
| /** | ||
| *NOTICE OF LICENSE | ||
| * | ||
| *This source file is subject to the Open Software License (OSL 3.0) | ||
| *that is bundled with this package in the file LICENSE.txt. | ||
| *It is also available through the world-wide-web at this URL: | ||
| *http://opensource.org/licenses/osl-3.0.php | ||
| *If you did not receive a copy of the license and are unable to | ||
| *obtain it through the world-wide-web, please send an email | ||
| *to license@prestashop.com so we can send you a copy immediately. | ||
| * | ||
| *DISCLAIMER | ||
| * | ||
| * Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
| *versions in the future. If you wish to customize PrestaShop for your | ||
| *needs please refer to http://www.prestashop.com for more information. | ||
| * | ||
| *@author INVERTUS UAB www.invertus.eu <support@invertus.eu> | ||
| *@copyright SIX Payment Services | ||
| *@license SIX Payment Services | ||
| */ | ||
|
|
||
| namespace Invertus\SaferPay\Service; | ||
|
|
||
| use Invertus\SaferPay\Config\SaferPayConfig; | ||
| use SaferPayOfficial; | ||
|
|
||
| if (!defined('_PS_VERSION_')) { | ||
| exit; | ||
| } | ||
|
|
||
| class CardPaymentGroupingService | ||
| { | ||
| /** @var SaferPayOfficial */ | ||
| private $module; | ||
|
|
||
| public function __construct(SaferPayOfficial $module) | ||
| { | ||
| $this->module = $module; | ||
| } | ||
|
|
||
| /** | ||
| * @param array $paymentMethods Raw payment methods from API | ||
| * @param array $allCurrencies List of all supported currencies (for CARD method) | ||
| * | ||
| * @return array Filtered/grouped payment methods | ||
| */ | ||
| public function group(array $paymentMethods, array $allCurrencies): array | ||
| { | ||
| $result = []; | ||
| $hasCardMethods = false; | ||
|
|
||
| foreach ($paymentMethods as $method) { | ||
| if (in_array($method['paymentMethod'], SaferPayConfig::CARD_BRANDS, true)) { | ||
| $hasCardMethods = true; | ||
| } else { | ||
| $result[] = $method; | ||
| } | ||
| } | ||
|
|
||
| if ($hasCardMethods) { | ||
| $result[] = [ | ||
| 'paymentMethod' => SaferPayConfig::PAYMENT_CARDS, | ||
| 'logoUrl' => _PS_BASE_URL_SSL_ . $this->module->getPathUri() . 'views/img/' . SaferPayConfig::PAYMENT_CARDS . '.png', | ||
| 'currencies' => $allCurrencies, | ||
| ]; | ||
| } | ||
|
|
||
| return $result; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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,36 @@ | ||
| <?php | ||
| /** | ||
| *NOTICE OF LICENSE | ||
| * | ||
| *This source file is subject to the Open Software License (OSL 3.0) | ||
| *that is bundled with this package in the file LICENSE.txt. | ||
| *It is also available through the world-wide-web at this URL: | ||
| *http://opensource.org/licenses/osl-3.0.php | ||
| *If you did not receive a copy of the license and are unable to | ||
| *obtain it through the world-wide-web, please send an email | ||
| *to license@prestashop.com so we can send you a copy immediately. | ||
| * | ||
| *DISCLAIMER | ||
| * | ||
| * Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
| *versions in the future. If you wish to customize PrestaShop for your | ||
| *needs please refer to http://www.prestashop.com for more information. | ||
| * | ||
| *@author INVERTUS UAB www.invertus.eu <support@invertus.eu> | ||
| *@copyright SIX Payment Services | ||
| *@license SIX Payment Services | ||
| */ | ||
|
|
||
| use Invertus\SaferPay\Config\SaferPayConfig; | ||
|
|
||
| if (!defined('_PS_VERSION_')) { | ||
| exit; | ||
| } | ||
|
|
||
| function upgrade_module_1_2_8() | ||
| { | ||
| Configuration::updateValue(SaferPayConfig::SAFERPAY_GROUP_CARDS, 0); | ||
| Configuration::updateValue(SaferPayConfig::SAFERPAY_SEND_ORDER_CONF_MAIL, 0); | ||
|
|
||
| return true; | ||
| } | ||
|
Comment on lines
+30
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function contains an unnecessary line with whitespace. For better code style and readability, it should be removed and a proper blank line can be added before the return statement. function upgrade_module_1_2_8()
{
Configuration::updateValue(SaferPayConfig::SAFERPAY_GROUP_CARDS, 0);
Configuration::updateValue(SaferPayConfig::SAFERPAY_SEND_ORDER_CONF_MAIL, 0);
return true;
} |
||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog for version 1.2.8 is missing the main bug fix introduced in this pull request. According to the PR title, a critical bug regarding email notifications for shipped orders was fixed. It's important to document this fix for users and future developers.
I suggest updating the changelog to include this information.