-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2612 from Adyen/develop
Release 9.5.2
- Loading branch information
Showing
19 changed files
with
1,844 additions
and
79 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,53 @@ | ||
<?php | ||
/** | ||
* | ||
* Adyen Payment module (https://www.adyen.com/) | ||
* | ||
* Copyright (c) 2024 Adyen MV (https://www.adyen.com/) | ||
* See LICENSE.txt for license details. | ||
* | ||
* Author: Adyen <[email protected]> | ||
*/ | ||
|
||
namespace Adyen\Payment\Gateway\Request; | ||
|
||
use Adyen\Payment\Helper\Data; | ||
use Magento\Payment\Gateway\Data\PaymentDataObject; | ||
use Magento\Payment\Gateway\Helper\SubjectReader; | ||
use Magento\Payment\Gateway\Request\BuilderInterface; | ||
|
||
class HeaderDataBuilder implements BuilderInterface | ||
{ | ||
const FRONTENDTYPE = 'frontendType'; | ||
const FRONTENDTYPE_HEADLESS = 'headless'; | ||
|
||
/** | ||
* @var Data | ||
*/ | ||
private Data $adyenHelper; | ||
|
||
/** | ||
* PaymentDataBuilder constructor. | ||
* | ||
* @param Data $adyenHelper | ||
*/ | ||
public function __construct( | ||
Data $adyenHelper | ||
) | ||
{ | ||
$this->adyenHelper = $adyenHelper; | ||
} | ||
|
||
/** | ||
* @param array $buildSubject | ||
* @return array | ||
*/ | ||
public function build(array $buildSubject): array | ||
{ | ||
/** @var PaymentDataObject $paymentDataObject */ | ||
$paymentDataObject = SubjectReader::readPayment($buildSubject); | ||
$payment = $paymentDataObject->getPayment(); | ||
$headers = $this->adyenHelper->buildRequestHeaders($payment); | ||
return ['headers' => $headers]; | ||
} | ||
} |
This file contains 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 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 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 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
Oops, something went wrong.