1 | <?php |
||
12 | class Stripe extends AbstractProvider |
||
13 | { |
||
14 | use BearerAuthorizationTrait; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $urlAuthorize = 'https://connect.stripe.com/oauth/authorize'; |
||
20 | |||
21 | /** |
||
22 | * Get authorization url to begin OAuth flow |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | 3 | public function getBaseAuthorizationUrl() |
|
30 | |||
31 | /** |
||
32 | * Get access token url to retrieve token |
||
33 | * |
||
34 | * @param array $params |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | 15 | public function getBaseAccessTokenUrl(array $params) |
|
42 | |||
43 | /** |
||
44 | * Get provider url to fetch user details |
||
45 | * |
||
46 | * @param AccessToken $token |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | 6 | public function getResourceOwnerDetailsUrl(AccessToken $token) |
|
54 | |||
55 | /** |
||
56 | * Get deauthorization url to end OAuth flow |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function getBaseDeauthorizationUrl() |
||
64 | |||
65 | /** |
||
66 | * Get the default scopes used by this provider. |
||
67 | * |
||
68 | * @return array |
||
69 | */ |
||
70 | 3 | protected function getDefaultScopes() |
|
74 | |||
75 | /** |
||
76 | * Check a provider response for errors. |
||
77 | * |
||
78 | * @param ResponseInterface $response |
||
79 | * @param array|string $data |
||
80 | * |
||
81 | * @throws IdentityProviderException |
||
82 | */ |
||
83 | 12 | protected function checkResponse(ResponseInterface $response, $data) |
|
93 | |||
94 | /** |
||
95 | * Generate a user object from a successful user details request. |
||
96 | * |
||
97 | * @param array $response |
||
98 | * @param AccessToken $token |
||
99 | * |
||
100 | * @return StripeResourceOwner |
||
101 | */ |
||
102 | 3 | protected function createResourceOwner(array $response, AccessToken $token) |
|
106 | |||
107 | 9 | protected function createAccessToken(array $response, AbstractGrant $grant) |
|
120 | |||
121 | /** |
||
122 | * @param string $stripeUserId stripe account ID |
||
123 | * |
||
124 | * @return mixed |
||
125 | */ |
||
126 | public function deauthorize($stripeUserId) |
||
143 | } |
||
144 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: