Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.1.1.0][1.1.1.0]
## [1.1.1.1]

### Fix
* Change debug logging of failed tests that depend on another one to work as expected.
* Several minor changes.

## [1.1.1.0]

### Changed
* Add email property to payment type `card` to meet 3Ds2.x regulations.
* Several minor changes.

## [1.1.0.0][1.1.0.0]
## [1.1.0.0]

### Changed
* Rebranding of the SDK.
Expand Down Expand Up @@ -43,3 +49,4 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a

[1.1.0.0]: https://github.com/unzerdev/php-sdk/compare/1260b8314af1ac461e33f0cfb382ffcd0e87c105..1.1.0.0
[1.1.1.0]: https://github.com/unzerdev/php-sdk/compare/1.1.0.0..1.1.1.0
[1.1.1.1]: https://github.com/unzerdev/php-sdk/compare/1.1.1.0..1.1.1.1
2 changes: 1 addition & 1 deletion examples/InstallmentSecured/PlaceOrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function redirect($url, $merchantMessage = '', $clientMessage = '')
}

// Check the result message of the transaction to find out what went wrong.
$merchantMessage = $authorize->getMessage()->getCustomer();
$merchantMessage = $charge->getMessage()->getCustomer();
} catch (UnzerApiException $e) {
$merchantMessage = $e->getMerchantMessage();
$clientMessage = $e->getClientMessage();
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<phpunit backupGlobals="false"
backupStaticAttributes="true"
backupStaticAttributes="false"
bootstrap="test/bootstrap.php"
colors="false"
convertErrorsToExceptions="true"
Expand Down
3 changes: 1 addition & 2 deletions test/BaseIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ protected function setUp(): void
*/
protected function tearDown(): void
{
/** @var TestDebugHandler $debugHandler */
$debugHandler = $this->unzer->getDebugHandler();
$debugHandler = self::getDebugHandler();

if ($this->getStatus() === BaseTestRunner::STATUS_PASSED) {
$debugHandler->clearTempLog();
Expand Down
15 changes: 14 additions & 1 deletion test/BasePaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ class BasePaymentTest extends TestCase
/** @var Unzer $unzer */
protected $unzer;

protected static $debughandler;

/**
* @return TestDebugHandler
*/
public static function getDebugHandler(): TestDebugHandler
{
if (!self::$debughandler instanceof TestDebugHandler) {
self::$debughandler = new TestDebugHandler();
}
return self::$debughandler;
}

/**
* Creates and returns an Unzer object if it does not exist yet.
* Uses an invalid but well formed default key if no key is given.
Expand All @@ -66,7 +79,7 @@ protected function getUnzerObject($privateKey = 's-priv-1234'): Unzer
{
if (!$this->unzer instanceof Unzer) {
$this->unzer = (new Unzer($privateKey))
->setDebugHandler(new TestDebugHandler())
->setDebugHandler(self::getDebugHandler())
->setDebugMode(true);
}
return $this->unzer;
Expand Down