Skip to content

Commit

Permalink
Merge pull request #989 from mollie/release-6.2.4
Browse files Browse the repository at this point in the history
Release 6.2.4
  • Loading branch information
GytisZum authored Nov 25, 2024
2 parents 2e34177 + 9bcb205 commit 4ec585c
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 16 deletions.
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-----------------------------------------------------------------------------
Thank you for contributing to the project!
Please take the time to edit the "Answers" rows below with the necessary information.
------------------------------------------------------------------------------>

| Questions | Answers
|-----------------| -------------------------------------------------------
| Branch? | Master/Release
| Description? | Please be specific when describing the PR. <br> Every detail helps: versions, browser/server configuration, specific module/theme, etc. Feel free to add more information below this table.
| Type? | bug fix / improvement / new feature / refactoring
| How to test? | Indicate how to verify that this change works as expected.
| Fixed issue ? | If none leave blank
5 changes: 2 additions & 3 deletions .github/workflows/E2E_On_PR.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Cypress E2E Automation [develop branch]
on:
pull_request:
types: [opened, reopened]
branches: [develop, develop**, develop-**]

concurrency:
Expand Down Expand Up @@ -59,7 +58,7 @@ jobs:
run: |
${{ matrix.make }}
- name: Waiting for Ngrok tunnel
- name: Waiting for Ngrok
run: |
URL="${{ matrix.url }}"
TIMEOUT=120
Expand Down Expand Up @@ -102,7 +101,7 @@ jobs:
- name: Archive videos and screenshots
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Cypress_Mollie_videos_screenshots_${{ matrix.prestashop }}
retention-days: 2
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/create_zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Create module ZIP

on:
workflow_dispatch:

jobs:
prepare-zip:
name: Prepare module ZIP artifact
runs-on: ubuntu-latest
env:
MODULE_NAME: mollie
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build module ZIP
run: |
composer install --no-dev --optimize-autoloader --classmap-authoritative
composer dump-autoload --no-dev --optimize --classmap-authoritative
cp .github/.htaccess vendor/.htaccess
rm -rf .git .docker .editorconfig .github tests .php-cs-fixer.php Makefile cypress .docker cypress.config.js cypress.env.json docker-compose*.yml .gitignore bin codeception.yml package-lock.json package.json .php_cs.dist .php-cs-fixer.dist .php-cs-fixer.dist.php
mv .env.dist .env
mkdir ${{ env.MODULE_NAME }}
rsync -Rr ./ ./${{ env.MODULE_NAME }}
shopt -s extglob
rm -r !(${{ env.MODULE_NAME }})
find . -maxdepth 1 -type f -exec rm "{}" \;
cd ${{ env.MODULE_NAME }} && rm -rf ${{ env.MODULE_NAME }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.MODULE_NAME }}
path: ./
38 changes: 37 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Tests

on: [ pull_request ]
on:
pull_request:
branches:
- '**'
push:
branches:
- 'master'

jobs:
php-cs-fixer:
Expand Down Expand Up @@ -62,3 +68,33 @@ jobs:

- name: Run PHPStan
run: docker run --rm --volumes-from temp-ps -v $PWD:/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module phpstan/phpstan:0.12 analyse --configuration=/web/module/tests/phpstan/phpstan_base.neon --debug --error-format github

prepare-zip:
name: Prepare module ZIP artifact
runs-on: ubuntu-latest
needs: [ test ]
env:
MODULE_NAME: mollie
steps:
# todo ask for permissions to add cancel previous workflow action
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build module ZIP
run: |
composer install --no-dev --optimize-autoloader --classmap-authoritative
composer dump-autoload --no-dev --optimize --classmap-authoritative
rm -rf .git .github tests .php-cs-fixer.php Makefile cypress* docker-compose*.yml package.json package-lock.json .docker
mkdir ${{ env.MODULE_NAME }}
rsync -Rr ./ ./${{ env.MODULE_NAME }}
shopt -s extglob
rm -r !(${{ env.MODULE_NAME }})
find . -maxdepth 1 -type f -exec rm "{}" \;
cd ${{ env.MODULE_NAME }} && rm -rf ${{ env.MODULE_NAME }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.MODULE_NAME }}
path: ./
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module = mollie

# target: fix-lint - Launch php cs fixer
fix-lint:
docker-compose run --rm php sh -c "vendor/bin/php-cs-fixer fix --using-cache=no"
docker compose run --rm php sh -c "vendor/bin/php-cs-fixer fix --using-cache=no"

# Launch the PS build and E2E Cypress app automatically. Eexample: make VERSION=1785 e2eh1785_local, make VERSION=8 e2eh8_local etc.
# Warning: .env with secrets must be imported if you wanna test locally! This checks the .env existence, ignoring if there is no such on your machine.
Expand All @@ -17,9 +17,9 @@ endif
e2eh$(VERSION)_local:
composer install
# detaching containers
docker-compose -f docker-compose.$(VERSION).yml up -d --force-recreate
docker compose -f docker-compose.$(VERSION).yml up -d --force-recreate
# sees what containers are running
docker-compose -f docker-compose.$(VERSION).yml ps
docker compose -f docker-compose.$(VERSION).yml ps
make waiting-for-containers-local
make seeding-customized-sql
make installing-uninstalling-enabling-module
Expand All @@ -29,9 +29,9 @@ e2eh$(VERSION)_local:
# For CI build with PS autoinstall
e2eh$(VERSION):
# detaching containers
docker-compose -f docker-compose.$(VERSION).yml up -d --force-recreate
docker compose -f docker-compose.$(VERSION).yml up -d --force-recreate
# sees what containers are running
docker-compose -f docker-compose.$(VERSION).yml ps
docker compose -f docker-compose.$(VERSION).yml ps
make waiting-for-containers-CI
make seeding-customized-sql
make installing-uninstalling-enabling-module
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
![Mollie](https://www.mollie.nl/files/Mollie-Logo-Style-Small.png)

# Changelog #

## Changes in release 6.2.4 ##
+ Workflow improvements
+ Satispay payment method added
+ Pay by Bank payment method added

## Changes in release 6.2.3 ##
+ Multi shop improvements with order states
+ Logging improvements
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"invertus/knapsack": "^10.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"invertus/prestashop-models": "^1.0",
"prestashop/php-dev-tools": "*",
"phpunit/phpunit": "~5.7",
Expand Down
8 changes: 7 additions & 1 deletion controllers/front/return.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ public function initContent()
}
if (false === $data['mollie_info']) {
$data['mollie_info'] = [];
$data['msg_details'] = $this->module->l('There is no order with this ID.', self::FILE_NAME);
//NOTE: information instead of error as this might occur due to cancellation of the payment
$logger->info(sprintf('There is no order with this order number - %s', (string) $orderNumber));

$data['msg_details'] = $this->module->l('Your payment was not successful. Try again.', self::FILE_NAME);
$this->setWarning($data['msg_details']);

Tools::redirect(Context::getContext()->link->getPageLink('cart', true));
} elseif (PaymentMethod::BANKTRANSFER === $data['mollie_info']['method']
&& PaymentStatus::STATUS_OPEN === $data['mollie_info']['bank_status']
) {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/ps8/05_mollie.ps8.PaymentTestsPaymentsAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ it('C339391: 56 Przelewy24 Checkouting [Payments API]', () => {
cy.contains('Przelewy24').click({force:true})
cy.get('.condition-label > .js-terms').click({force:true})
cy.contains('Place order').click()
cy.get('.input-float > input').type('[email protected]')
cy.get('[class="button form__button"]').click()
cy.get('[value="paid"]').click()
cy.get('[class="button form__button"]').click()
cy.get('#content-hook_order_confirmation > .card-block').should('be.visible')
Expand Down
2 changes: 1 addition & 1 deletion mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function __construct()
{
$this->name = 'mollie';
$this->tab = 'payments_gateways';
$this->version = '6.2.3';
$this->version = '6.2.4';
$this->author = 'Mollie B.V.';
$this->need_instance = 1;
$this->bootstrap = true;
Expand Down
12 changes: 10 additions & 2 deletions src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,19 @@ class Config
'cartesbancaires' => ['fr'],
'directdebit' => [
'fi', 'at', 'pt', 'be', 'bg', 'es', 'hr', 'cy', 'cz', 'dk', 'ee', 'fr', 'gf', 'de', 'gi', 'gr', 'gp', 'gg', 'hu',
'is', 'ie', 'im', 'it', 'je', 'lv', 'li', 'lt', 'lu', 'pt', 'mt', 'mq', 'yt', 'mc', 'nl', 'no', 'pl', 'pt', 're',
'ro', 'bl', 'mf', 'pm', 'sm', 'sk', 'sl', 'es', 'se', 'ch', 'gb', 'uk',
'is', 'ie', 'im', 'it', 'je', 'lv', 'li', 'lt', 'lu', 'mt', 'mq', 'yt', 'mc', 'nl', 'no', 'pl', 're',
'ro', 'bl', 'mf', 'pm', 'sm', 'sk', 'sl', 'se', 'ch', 'gb', 'uk',
],
'mybank' => [],
'trustly' => ['at', 'de', 'ee', 'es', 'fi', 'lt', 'lv', 'nl'],
'satispay' => [
'at', 'be', 'bg', 'hr', 'cy', 'cz', 'dk', 'ee', 'fi', 'fr', 'de', 'gr', 'hu', 'is', 'ie',
'it', 'lv', 'lt', 'lu', 'mt', 'nl', 'no', 'pl', 'pt', 'ro', 'sk', 'si', 'es', 'se', 'ch',
'li', 'gb', 'tr',
],
'riverty' => ['nl', 'be', 'de', 'at'],
'payconiq' => [],
'paybybank' => ['at', 'be', 'cy', 'ee', 'fi', 'fr', 'de', 'gr', 'ie', 'it', 'lv', 'lt', 'lu', 'mt', 'nl', 'pt', 'sk', 'si', 'es', 'uk'],
];

const SUPPORTED_PHP_VERSION = '5.6';
Expand Down Expand Up @@ -327,6 +333,8 @@ class Config
'riverty' => 'Riverty',
'payconiq' => 'Payconiq',
'trustly' => 'Trustly',
'satispay' => 'Satispay',
'paybybank' => 'Pay by Bank',
];

public const LOG_SEVERITY_LEVEL_INFORMATIVE = 1;
Expand Down

0 comments on commit 4ec585c

Please sign in to comment.