-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f74b97e
commit 599db5d
Showing
6 changed files
with
114 additions
and
4 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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
/vendor | ||
/composer.lock | ||
/tmp | ||
/.php_cs.cache | ||
/.php_cs.cache | ||
/.phpunit.result.cache |
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,26 @@ | ||
<?php | ||
|
||
namespace rikudou\EuQrPayment\Config; | ||
|
||
abstract class AbstractConfiguration implements ConfigurationInterface | ||
{ | ||
public function getVersion(): string | ||
{ | ||
return '002'; | ||
} | ||
|
||
public function getCustomData(): iterable | ||
{ | ||
return []; | ||
} | ||
|
||
public function getAmountPrecision(): ?int | ||
{ | ||
return null; | ||
} | ||
|
||
public function getDueDateHandler(): ?DueDateHandlerInterface | ||
{ | ||
return null; | ||
} | ||
} |
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,7 @@ | ||
<?php | ||
|
||
namespace rikudou\EuQrPayment\Config; | ||
|
||
final class Configuration extends AbstractConfiguration | ||
{ | ||
} |
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,34 @@ | ||
<?php | ||
|
||
namespace rikudou\EuQrPayment\Config; | ||
|
||
interface ConfigurationInterface | ||
{ | ||
/** | ||
* The standard version like 001 or 002 | ||
* | ||
* @return string | ||
*/ | ||
public function getVersion(): string; | ||
|
||
/** | ||
* Additional custom data to be appended at the generated string | ||
* | ||
* @return iterable<string> | ||
*/ | ||
public function getCustomData(): iterable; | ||
|
||
/** | ||
* The precision to be applied to the amount | ||
* | ||
* @return int|null | ||
*/ | ||
public function getAmountPrecision(): ?int; | ||
|
||
/** | ||
* The standard does not support setting due date, you can use this to set your own non-standard implementation | ||
* | ||
* @return DueDateHandlerInterface|null | ||
*/ | ||
public function getDueDateHandler(): ?DueDateHandlerInterface; | ||
} |
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 @@ | ||
<?php | ||
|
||
namespace rikudou\EuQrPayment\Config; | ||
|
||
use DateTimeInterface; | ||
|
||
interface DueDateHandlerInterface | ||
{ | ||
public function setDueDate(DateTimeInterface $dueDate): void; | ||
|
||
public function getDueDate(): DateTimeInterface; | ||
} |
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