| Total Complexity | 5 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Coverage | 84.62% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class StripeConfiguration |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string Stripe Client ID |
||
| 18 | * @see https://dashboard.stripe.com/settings/applications |
||
| 19 | */ |
||
| 20 | private $clientId; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string Stripe Client Secret |
||
| 24 | */ |
||
| 25 | private $clientSecret; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string Redirection URL back to the client application |
||
| 29 | */ |
||
| 30 | private $redirectUrl; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * StripeConfiguration constructor. |
||
| 34 | * |
||
| 35 | * @param string $clientId Stripe Client ID |
||
| 36 | * @param string $clientSecret Stripe Client Secret |
||
| 37 | * @param string $redirectUrl Redirection URL back to the client application |
||
| 38 | */ |
||
| 39 | 2 | public function __construct($clientId, $clientSecret, $redirectUrl) |
|
| 40 | { |
||
| 41 | 2 | $this->clientId = $clientId; |
|
| 42 | 2 | $this->clientSecret = $clientSecret; |
|
| 43 | 2 | $this->redirectUrl = $redirectUrl; |
|
| 44 | 2 | } |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @return string |
||
| 48 | */ |
||
| 49 | 1 | public function clientId() |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | 1 | public function clientSecret() |
|
| 58 | { |
||
| 59 | 1 | return $this->clientSecret; |
|
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | 1 | public function redirectUrl() |
|
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * This is just to identify that, we initiated the login sequence (not someone else) |
||
| 72 | * |
||
| 73 | * @return string |
||
| 74 | */ |
||
| 75 | public function ourSecretState() |
||
| 78 | } |
||
| 79 | } |
||
| 80 |