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

Task/payoswxp 106 fix typo #1

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d9cfc13
[PAYONE-178] Remove birthday field from open invoice
Feb 1, 2023
66b052d
Merge pull request #232 from PAYONE-GmbH/task/PAYONE-178
janteuber Feb 1, 2023
3c8b665
PAYOSWXP-87: fix data-type-casting in migration
rommelfreddy Feb 17, 2023
7e52807
[PAYONE-183] Update iDeal issuer list
Mar 6, 2023
4063bef
Merge pull request #241 from PAYONE-GmbH/task/PAYONE-183-iDeal-Issuer…
janteuber Mar 7, 2023
f4bfbc8
[PAYONE-171] Add new payment method Secured Invoice
Dec 12, 2022
685e8e8
[PAYONE-171] Add new payment method secured installment
Feb 9, 2023
2b03426
[PAYONE-180] Add new payment method secured direct debit
Mar 1, 2023
870f242
Merge pull request #242 from PAYONE-GmbH/feature/PAYONE-180-Secured-D…
janteuber Mar 9, 2023
f3e251f
PAYOSWXP-93: improve support for vouchers
rommelfreddy Feb 15, 2023
605828b
Merge pull request #238 from rommelfreddy/task/PAYOSWXP-87_migration-…
janteuber Mar 15, 2023
d21c60c
Merge pull request #236 from rommelfreddy/task/PAYOSWXP-93_voucher-pa…
janteuber Mar 15, 2023
aa4ceef
version bump to 420
janteuber Mar 16, 2023
44b003c
Merge pull request #244 from PAYONE-GmbH/version-bump-420
janteuber Mar 16, 2023
0488909
Fix composer version in archive workflow
Mar 17, 2023
feb910c
Merge pull request #245 from PAYONE-GmbH/fix/archive-workflow
janteuber Mar 17, 2023
9dfeb1a
version bump to 420
janteuber Mar 17, 2023
aa95e16
Merge pull request #246 from PAYONE-GmbH/version-bump-420
janteuber Mar 20, 2023
c2f0c27
[PAYONE-188] Fix capture for bancontact
Mar 28, 2023
cee83f6
Merge pull request #247 from PAYONE-GmbH/fix/PAYONE-188-Bancontact-Ca…
janteuber Mar 29, 2023
14594c3
PAYOSWXP-106: payla: fix typo in dfp-snippet
rommelfreddy Jun 12, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
php-version: 7.4
extensions: mbstring, xdebug, curl, dom, fileinfo, gd, iconv, intl, json, xml, mbstring, pdo, phar, zip, sodium
tools: composer:v2
tools: composer:v2.2
- name: Check PHP Version
run: php -v
- name: Check Composer Version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
php-versions: [ '7.4', '8.0' ]
shopware-versions: [ 'v6.4.0.0', 'v6.4.1.0', 'v6.4.2.0', 'v6.4.3.0', 'v6.4.4.0', 'v6.4.5.0', 'v6.4.6.0', 'v6.4.7.0', 'v6.4.8.0', 'v6.4.9.0', 'v6.4.10.0', 'v6.4.11.0', 'v6.4.12.0', 'v6.4.13.0', 'v6.4.14.0', 'v6.4.15.0', 'v6.4.16.0', 'v6.4.17.0' ]
shopware-versions: [ 'v6.4.0.0', 'v6.4.1.0', 'v6.4.2.0', 'v6.4.3.0', 'v6.4.4.0', 'v6.4.5.0', 'v6.4.6.0', 'v6.4.7.0', 'v6.4.8.0', 'v6.4.9.0', 'v6.4.10.0', 'v6.4.11.0', 'v6.4.12.0', 'v6.4.13.0', 'v6.4.14.0', 'v6.4.15.0', 'v6.4.16.0', 'v6.4.17.0', 'v6.4.18.0', 'v6.4.19.0', 'v6.4.20.0' ]
name: Shopware ${{ matrix.shopware-versions }} on PHP ${{ matrix.php-versions }}
services:
mysql:
Expand Down
133 changes: 87 additions & 46 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,50 +62,50 @@ Maintenance
# 2.1.0

New Features

* new payment method: PAYONE safe invoice
* new payment method: Trustly
* added optional submission of order number in the "narrative_text" parameter. This will show the shopware order number on the customer's bank statement or payment info (depending on payment method). If left out, our internal txid is shown.

Bugfix(es)

* fixed payone_allow_refund and payone_allow_capture custom fields to better reflect the current status of an order. This can help when issuing captures and debits via third party systems

Maintenance

* tested with Shopware 6.3.4.1

# 2.2.0

New Features

* compatibility with Shopware 6.4.x

Bugfixes

* fixed API Test for paydirekt
* always provide shipping address for paypal payments
* fixed labels for PAYONE status mapping (finally!)
* fixed labels for PAYONE status mapping (finally!)

Maintenance

* tested with Shop version 6.4.1.0
* better error message translations

# 2.3.0

New Features

* new PAYONE permissions management
* status mapping per payment method possible

Bugfixes

* fix for unlock the buy now button
* PayPal Express: telephone number not a mandatory field
* PayPal Express: telephone number not a mandatory field

Maintenance

* Shopware 6.4.3.1 compatibility
* massive refactoring effort
* Elasticsearch compatibility
Expand All @@ -120,7 +120,7 @@ Bugfix

Bugfix

* transaction status transmission of txstatus "paid"
* transaction status transmission of txstatus "paid"

Maintenance

Expand Down Expand Up @@ -185,12 +185,12 @@ Maintenance
# 3.1.0

New Features

* New payment method: Open Invoice
* Add checkbox for credit card payments to save or remove payment data

Bugfixes

* remove capturemode param if completed
* update ZeroAmountCartValidator
* always set data protection check
Expand All @@ -205,19 +205,19 @@ Shopware 6.4.10.0
# 3.2.0

New Features

* New payment method: Bancontact
* Added bankgrouptypes for iDEAL
* Add scheduled task to clean up redirect table
* Add due date for invoice on standard invoice

Bugfixes

* added shipping costs to line items
* fixed removal of secure invoice

Maintenance

* Changed renaming of payment methods
* Changed PAYONE Logo
* tested with 6.4.12
Expand All @@ -238,33 +238,33 @@ Maintenance
# 4.0.0

New Features

* Shopware 6.3 support removed
* General code optimizations implemented

* Important change: The transaction data of PAYONE payments was
previously always stored in the additional fields of the orders.
Since the additional fields are stored as JSON in the database,
searching the transaction data was not very performant for large
amounts of data. Therefore, an entity extension was set up for
the transaction data so that the data is stored in an extra database
table that can be searched much more performantly. During the plugin
update, the old additional fields are migrated to the entity extension
and then the additional fields are deleted. If you have used our
additional fields in your own code or for example in the synchronization
* Important change: The transaction data of PAYONE payments was
previously always stored in the additional fields of the orders.
Since the additional fields are stored as JSON in the database,
searching the transaction data was not very performant for large
amounts of data. Therefore, an entity extension was set up for
the transaction data so that the data is stored in an extra database
table that can be searched much more performantly. During the plugin
update, the old additional fields are migrated to the entity extension
and then the additional fields are deleted. If you have used our
additional fields in your own code or for example in the synchronization
to external systems, you have to adapt this to the new entity extension.

Bugfix

* Remove deletion of saved credit cards

Maintenance

* Remove BIC from debit
* Tested with 6.4.16

### Read transaction data ###
```
```
$criteria = (new Criteria())
->addAssociation(PayonePaymentOrderTransactionExtension::NAME)
->addFilter(new EqualsFilter(PayonePaymentOrderTransactionExtension::NAME . '.transactionId', $payoneTransactionId));
Expand Down Expand Up @@ -292,19 +292,60 @@ $this->transactionRepository->upsert([[
# 4.1.0

New Features

* New payment method: Klarna Rechnung
* New payment method: Klarna Sofort
* New payment method: Klarna Ratenkauf
* New payment method: P24
* The credit card - card type is now displayed in the backend at the order details

Bugfixes

* Fixed redirect routing when using multi-saleschannels - Thanks to @patchee500
* Fixed Unzer B2B
* Fixed Refund with wrong tx_id

Maintenance

* tested with 6.4.17.1

# 4.2.0

New Features

* New payment method: PAYONE Secured Invoice
* New payment method: PAYONE Secured Installment
* New payment method: PAYONE Secured Direct Debit
* New payment method: PAYONE WeChat Pay
* New payment method: PAYONE Postfinance Card
* New payment method: PAYONE Postfinance E-Finance
* New payment method: PAYONE AliPay
* Opt-in for automatic capture

Bugfixes

* fixed reference problem in paydirekt
* fixed capture problem in iDEAL
* fixed data-type-casting in migration
* fixed support for vouchers

Maintenance

* improve payment filter technology
* removed birthday field from open invoice
* update iDEAL issuer list
* tested with 6.4.20

# 4.2.1

New Features

*

Bugfixes

* Payla: fix typo in deviceFingerPrint

Maintenance

*
22 changes: 22 additions & 0 deletions CHANGELOG_de-DE.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,25 @@ Fehlerbehebung
Wartung

* Getestet mit: 6.4.17.1

# 4.2.0

* Neue Zahlungsart: PAYONE WeChat Pay
* Neue Zahlungsart: PAYONE Postfinance Card
* Neue Zahlungsart: PAYONE Postfinance E-Finance
* Neue Zahlungsart: PAYONE AliPay
* Opt-in für automatischen Capture

Fehlerbehebung

* Fehler mit der Bestellnummer bei paydirekt behoben
* Fehler beim Capture bei iDEAL behoben
* Fehler bei Datentyp Migration behoben
* Fehler bei der Unterstützung von Rabattcodes behoben

Wartung

* Zahlungsartenfilter Technologie verbessert
* Geburtstagsfeld aus der Zahlungsart offene Rechnung entfernt
* iDEAL Bankliste geupdated
* getestet mit 6.4.20
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "payone-gmbh/shopware-6",
"type": "shopware-platform-plugin",
"description": "PAYONE Payment Plugin",
"version": "4.1.0",
"version": "4.2.0",
"license": "MIT",
"authors": [
{
Expand Down
8 changes: 7 additions & 1 deletion src/Components/CartHasher/CartHasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ private function getHashData(Struct $entity, SalesChannelContext $context): arra
return $hashData;
}

$hashData['items'] = [];
if ($entity->getLineItems() !== null) {
foreach ($entity->getLineItems() as $lineItem) {
try {
Expand All @@ -123,10 +124,15 @@ private function getHashData(Struct $entity, SalesChannelContext $context): arra
$detail['price'] = $this->currencyPrecision->getRoundedItemAmount($lineItem->getPrice()->getTotalPrice(), $context->getCurrency());
}

$hashData[] = $detail;
$hashData['items'][] = md5((string) json_encode($detail));
}
}

// sort hashed items to make sure, they are always in the same order (cart/order) cause Shopware will re-order
// the items after placing the order for an unknown reason. If we collect the items and pass them directly into
// the hash, the items may be in a different order, after the order has been placed --> validation will fail.
sort($hashData['items']);

$hashData['currency'] = $context->getCurrency()->getId();
$hashData['paymentMethod'] = $context->getPaymentMethod()->getId();
$hashData['shippingMethod'] = $context->getShippingMethod()->getId();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

declare(strict_types=1);

namespace PayonePayment\Components\DeviceFingerprint;

use PayonePayment\PaymentHandler\AbstractPayonePaymentHandler;
use Shopware\Core\System\SalesChannel\SalesChannelContext;
use Symfony\Component\HttpFoundation\Session\SessionInterface;

abstract class AbstractDeviceFingerprintService
{
protected SessionInterface $session;

public function __construct(SessionInterface $session)
{
$this->session = $session;
}

/**
* @return array<class-string<AbstractPayonePaymentHandler>>
*/
abstract public function getSupportedPaymentHandlerClasses(): array;

abstract public function getDeviceIdentSnippet(string $deviceIdentToken, SalesChannelContext $salesChannelContext): string;

public function getDeviceIdentToken(SalesChannelContext $salesChannelContext): string
{
$sessionValue = $this->session->get($this->getSessionVarName());

if ($sessionValue) {
$token = $sessionValue;
} else {
$token = $this->buildDeviceIdentToken($salesChannelContext);
$this->session->set($this->getSessionVarName(), $token);
}

return $token;
}

public function isDeviceIdentTokenAlreadyGenerated(): bool
{
return $this->session->get($this->getSessionVarName()) !== null;
}

public function deleteDeviceIdentToken(): void
{
$this->session->remove($this->getSessionVarName());
}

abstract protected function getSessionVarName(): string;

abstract protected function buildDeviceIdentToken(SalesChannelContext $salesChannelContext): string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

declare(strict_types=1);

namespace PayonePayment\Components\DeviceFingerprint;

use PayonePayment\PaymentHandler\AbstractPayonePaymentHandler;

class DeviceFingerprintServiceCollection implements DeviceFingerprintServiceCollectionInterface
{
/**
* @var array<class-string<AbstractPayonePaymentHandler>, AbstractDeviceFingerprintService>
*/
protected array $services = [];

/**
* @param iterable<AbstractDeviceFingerprintService> $services
*/
public function __construct(iterable $services)
{
foreach ($services as $service) {
foreach ($service->getSupportedPaymentHandlerClasses() as $paymentHandlerClass) {
$this->services[$paymentHandlerClass] = $service;
}
}
}

public function getForPaymentHandler(string $paymentHandlerClass): ?AbstractDeviceFingerprintService
{
return $this->services[$paymentHandlerClass] ?? null;
}
}
Loading