Skip to content

Commit

Permalink
Merge pull request #211 from OXID-eSales/UNZER-275_Actualize_b-7.0.x_…
Browse files Browse the repository at this point in the history
…branch

Unzer 275 actualize b 7.0.x branch
  • Loading branch information
mariolorenz authored Nov 29, 2023
2 parents b427061 + 742856e commit 4bf46fa
Show file tree
Hide file tree
Showing 55 changed files with 1,912 additions and 1,042 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/build-v7-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Build image for v7 Demoshop

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
schedule:
- cron: '16 6 * * *'
push:
branches:
- b-7.0.x
repository_dispatch:
types: [docker-build]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

jobs:

build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: b-7.0.x

- name: Checkout dockerfiles
uses: actions/checkout@v4
with:
repository: OXID-eSales/module-demoshop-images
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
path: dockerfiles

- name: move dockerfiles to root folder
run: mv dockerfiles/unzer/* .

- name: downcase REPO
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.v7
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.REGISTRY }}/${{ env.REPO }}:v7
secrets: |
"github_token=${{ secrets.GITHUB_TOKEN }}"
16 changes: 8 additions & 8 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -47,12 +47,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.get_latest_tag.outputs.tag }}

- name: Checkout dockerfiles
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: OXID-eSales/module-demoshop-images
token: ${{ secrets.GH_PAT }} # `GH_PAT` is a secret that contains your PAT
Expand All @@ -66,16 +66,16 @@ jobs:
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -85,14 +85,14 @@ jobs:
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@c4ee3adeed93b1fa6a762f209fb01608c1a22f1e
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,61 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [2.0.3] - 2023-11-??

### FIXED
- [0007503](https://bugs.oxid-esales.com/view.php?id=7503) When ordering via the Unzer module, the OXID standard field OXORDER__OXTRANSID remains empty
- [0007526](https://bugs.oxid-esales.com/view.php?id=7526) Order would be saved only, if everything is correct. In all other cases redirect to checkout
- [0007509](https://bugs.oxid-esales.com/view.php?id=7509) Order would be saved only, if everything is correct. In all other cases redirect to checkout
- [0007524](https://bugs.oxid-esales.com/view.php?id=7524) catch Error if Unzer-API not working and redirect to Checkout
- [0007527](https://bugs.oxid-esales.com/view.php?id=7527) prevent clicking the buy-now-button several times
- [0007544](https://bugs.oxid-esales.com/view.php?id=7544) Add Error handling When unsupported Credit Card is used (e.g. Amex)
- [0007553](https://bugs.oxid-esales.com/view.php?id=7553) The billing and delivery address must be identical for invoice purchases (Paylater)
- [0007546](https://bugs.oxid-esales.com/view.php?id=7546): We provide an additional Order Number to Unzer for identify the Order in OXID-Backend and Unzer-Insights

- apple pay session init only when eligible
- compatibility-issue against other modules that also extend the moduleconfiguration
- Adjust payment date when the payment has been completed
- Prepayment - Adjust payment date when the payment has been completed
- change information for Unzer-Metadata

## [2.0.0] - 2023-07-XX

### NEW
- Update module for OXID 7.0

## [1.1.4] - 2023-??-??

- [0007553](https://bugs.oxid-esales.com/view.php?id=7553) revert this task because, it is possible to have different billing and delivery addresses for invoice purchases (Paylater)
- Discounts with time restrictions may not be invalidated directly in the checkout...
- provided additional Order-Number is searchable
- increase line spacing for the error messages

## [1.1.3] - 2023-??-??

- [0007526](https://bugs.oxid-esales.com/view.php?id=7526) Order would be saved only, if everything is correct. In all other cases redirect to checkout
- [0007509](https://bugs.oxid-esales.com/view.php?id=7509) Order would be saved only, if everything is correct. In all other cases redirect to checkout
- [0007524](https://bugs.oxid-esales.com/view.php?id=7524) catch Error if Unzer-API not working and redirect to Checkout
- [0007527](https://bugs.oxid-esales.com/view.php?id=7527) prevent clicking the buy-now-button several times
- [0007544](https://bugs.oxid-esales.com/view.php?id=7544) Add Error handling When unsupported Credit Card is used (e.g. Amex)
- [0007553](https://bugs.oxid-esales.com/view.php?id=7553) The billing and delivery address must be identical for invoice purchases (Paylater)
- [0007546](https://bugs.oxid-esales.com/view.php?id=7546): We provide an additional Order Number to Unzer for identify the Order in OXID-Backend and Unzer-Insights
- Prepayment - Adjust payment date when the payment has been completed
- change information for Unzer-Metadata
- Unzer Invoice (Paylater): Display bank details for invoice

## [1.1.2] - 2023-08-18

### FIXED
- compatibility-issue against other modules that also extend the moduleconfiguration
- [0007503](https://bugs.oxid-esales.com/view.php?id=7503) When ordering via the Unzer module, the OXID standard field OXORDER__OXTRANSID remains empty
- Adjust payment date when the payment has been completed

## [1.1.1] - 2023-06-19

### FIXED
- apple pay session init only when eligible

## [1.1.0] - 2023-06-02

### NEW
Expand Down
17 changes: 12 additions & 5 deletions metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
* Metadata version
*/

use OxidSolutionCatalysts\Unzer\Model\DiscountList;
use OxidSolutionCatalysts\Unzer\Controller\Admin\AdminOrderController;
use OxidSolutionCatalysts\Unzer\Controller\Admin\ModuleConfiguration;
use OxidSolutionCatalysts\Unzer\Controller\Admin\OrderMain;
use OxidSolutionCatalysts\Unzer\Controller\Admin\OrderList;
use OxidSolutionCatalysts\Unzer\Controller\ApplePayCallbackController;
use OxidSolutionCatalysts\Unzer\Controller\DispatcherController;
use OxidSolutionCatalysts\Unzer\Controller\InstallmentController;
Expand All @@ -20,7 +22,6 @@
use OxidSolutionCatalysts\Unzer\Core\Config;
use OxidSolutionCatalysts\Unzer\Core\ShopControl;
use OxidSolutionCatalysts\Unzer\Core\ViewConfig;
use OxidSolutionCatalysts\Unzer\Model\PaymentGateway;
use OxidSolutionCatalysts\Unzer\Model\Article;
use OxidSolutionCatalysts\Unzer\Model\Order;
use OxidSolutionCatalysts\Unzer\Model\Payment;
Expand Down Expand Up @@ -51,22 +52,23 @@
</ul>',
],
'thumbnail' => 'logo.svg',
'version' => '1.1.0',
'version' => '2.0.4-rc.1',
'author' => 'OXID eSales AG',
'url' => 'https://www.oxid-esales.com',
'email' => '[email protected]',
'extend' => [
\OxidEsales\Eshop\Application\Controller\Admin\ModuleConfiguration::class => ModuleConfiguration::class,
\OxidEsales\Eshop\Application\Controller\Admin\OrderMain::class => OrderMain::class,
\OxidEsales\Eshop\Application\Controller\Admin\OrderList::class => OrderList::class,
\OxidEsales\Eshop\Application\Controller\OrderController::class => OrderController::class,
\OxidEsales\Eshop\Application\Controller\PaymentController::class => PaymentController::class,
\OxidEsales\Eshop\Application\Model\Article::class => Article::class,
\OxidEsales\Eshop\Application\Model\DiscountList::class => DiscountList::class,
\OxidEsales\Eshop\Application\Model\Order::class => Order::class,
\OxidEsales\Eshop\Application\Model\Payment::class => Payment::class,
\OxidEsales\Eshop\Application\Model\PaymentGateway::class => PaymentGateway::class,
\OxidEsales\Eshop\Core\Config::class => Config::class,
\OxidEsales\Eshop\Core\ShopControl::class => ShopControl::class,
\OxidEsales\Eshop\Core\ViewConfig::class => ViewConfig::class,
\OxidEsales\Eshop\Core\Config::class => Config::class,
],
'controllers' => [
'unzer_admin_order' => AdminOrderController::class,
Expand Down Expand Up @@ -133,6 +135,11 @@
'block' => 'admin_module_config_var',
'file' => 'views/smarty/admin/blocks/admin_module_config_var.tpl'
],
[
'template' => 'order_list.tpl',
'block' => 'admin_order_list_item',
'file' => 'views/admin/blocks/admin_order_list_item.tpl'
],
//email
[
'template' => 'email/plain/order_cust.tpl',
Expand Down Expand Up @@ -226,7 +233,7 @@
'group' => 'unzerapplepay',
'name' => 'applepay_label',
'type' => 'str',
'value' => ''
'value' => 'default lable please change'
],
[
'group' => 'unzerapplepay',
Expand Down
53 changes: 53 additions & 0 deletions migration/data/Version20231107212500.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php

/**
* Copyright © OXID eSales AG. All rights reserved.
* See LICENSE file for license details.
*/

declare(strict_types=1);

namespace OxidSolutionCatalysts\Unzer\Migrations;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Types;
use Doctrine\Migrations\AbstractMigration;
use Psr\Log\LoggerInterface;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20231107212500 extends AbstractMigration
{
/** @throws Exception */
public function __construct(Connection $connection, LoggerInterface $logger)
{
parent::__construct($connection, $logger);

$this->platform->registerDoctrineTypeMapping('enum', 'string');
}

public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
$this->updateOxOrderTable($schema);
}

public function down(Schema $schema): void
{
}

protected function updateOxOrderTable(Schema $schema): void
{
$oxorder = $schema->getTable('oxorder');
if (!$oxorder->hasColumn('OXUNZERORDERNR')) {
$oxorder->addColumn('OXUNZERORDERNR', Types::INTEGER, ['columnDefinition' => 'int(11)', 'default' => 0, 'comment' => 'Unzer Order Nr']);
}
}
}
7 changes: 3 additions & 4 deletions services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ services:
$logFilePath: '@=service("OxidSolutionCatalysts\\Unzer\\Service\\Context").getUnzerLogFilePath()'
$logLevel: !php/const Psr\Log\LogLevel::INFO

OxidSolutionCatalysts\Unzer\Service\:
resource: 'src/Service/*'
exclude: 'src/Service/{DebugHandler}'
OxidSolutionCatalysts\Unzer\Core\Response:
public: true

OxidSolutionCatalysts\Unzer\Core\Response:
OxidSolutionCatalysts\Unzer\Service\:
resource: 'src/Service/*'
public: true

OxidSolutionCatalysts\Unzer\Service\DebugHandler:
Expand Down
Loading

0 comments on commit 4bf46fa

Please sign in to comment.