This repository has been archived by the owner on Nov 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
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 #11 from heidelpay/integration-1.0.0
Integration 1.0.0
- Loading branch information
Showing
174 changed files
with
4,109 additions
and
471 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
src/Resources/public/storefront/js/* | ||
src/Resources/public/administration/js/* | ||
src/Resources/dist/* | ||
coverage/ | ||
src/Resources/public | ||
src/Resources/app/**/dist |
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 |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
vendor | ||
.phpunit.result.cache | ||
.idea | ||
.package-lock.json | ||
|
||
package-lock.json | ||
cypress.json | ||
node_modules |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
{ | ||
"baseUrl": "http://heidelpay.local", | ||
"integrationFolder": "tests/cypress/integration", | ||
"fixturesFolder": "tests/cypress/fixtures", | ||
"componentFolder": "tests/cypress/component", | ||
"pluginsFile": "tests/cypress/plugins", | ||
"supportFile": "tests/cypress/support", | ||
"videosFolder": "cypress/videos", | ||
"screenshotsFolder": "cypress/screenshots", | ||
"chromeWebSecurity": false, | ||
"watchForFileChanges": false | ||
} |
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,13 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"cypress:open": "./node_modules/.bin/cypress open", | ||
"cypress:run": "./node_modules/.bin/cypress run --record false --config video=false", | ||
"eslint:lint": "../../../vendor/shopware/platform/src/Administration/Resources/app/administration/node_modules/.bin/eslint -c ../../../vendor/shopware/platform/src/Administration/Resources/app/administration/.eslintrc.js --rulesdir . --ext .js,.vue src", | ||
"eslint:fix": "../../../vendor/shopware/platform/src/Administration/Resources/app/administration/node_modules/.bin/eslint -c ../../../vendor/shopware/platform/src/Administration/Resources/app/administration/.eslintrc.js --rulesdir . --ext .js,.vue src --fix" | ||
}, | ||
"devDependencies": { | ||
"cypress": "^4.7.0", | ||
"cypress-pipe": "^1.7.0" | ||
} | ||
} |
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,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace HeidelPayment6\Components; | ||
|
||
use Exception; | ||
|
||
abstract class AbstractHeidelPaymentException extends Exception | ||
{ | ||
/** @var string */ | ||
protected $customerMessage = 'exception/statusMapper'; | ||
|
||
public function getCustomerMessage(): string | ||
{ | ||
return $this->customerMessage; | ||
} | ||
} |
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
31 changes: 31 additions & 0 deletions
31
src/Components/DependencyInjection/Factory/PaymentTransitionMapperFactory.php
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,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace HeidelPayment6\Components\DependencyInjection\Factory; | ||
|
||
use HeidelPayment6\Components\PaymentTransitionMapper\AbstractTransitionMapper; | ||
use HeidelPayment6\Components\PaymentTransitionMapper\Exception\NoTransitionMapperFoundException; | ||
use heidelpayPHP\Resources\PaymentTypes\BasePaymentType; | ||
|
||
class PaymentTransitionMapperFactory | ||
{ | ||
/** @var AbstractTransitionMapper[]|iterable */ | ||
protected $transitionMapperCollection = []; | ||
|
||
public function __construct(iterable $transitionMapperCollection) | ||
{ | ||
$this->transitionMapperCollection = $transitionMapperCollection; | ||
} | ||
|
||
public function getTransitionMapper(BasePaymentType $paymentType): AbstractTransitionMapper | ||
{ | ||
foreach ($this->transitionMapperCollection as $transitionMapper) { | ||
if ($transitionMapper->supports($paymentType)) { | ||
return $transitionMapper; | ||
} | ||
} | ||
|
||
throw new NoTransitionMapperFoundException($paymentType::getResourceName()); | ||
} | ||
} |
Oops, something went wrong.