This repository has been archived by the owner on May 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 296
fix: PHP Card exception to newer API reference #19
Open
jackbayliss
wants to merge
10
commits into
stripe-archive:master
Choose a base branch
from
jackbayliss:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Changed card exception to newer reference.
jackbayliss
changed the title
fix: Card exception to newer API reference
fix: PHP Card exception to newer API reference
Mar 20, 2020
Thanks, @jackbayliss, however this also requires an upgrade of the Stripe PHP libraries. Do you want to do that also? If not I can open a separate PR and close this one out. |
@thorsten-stripe I've updated the stripe/stripe-php library to |
Sorry for the delay, and sorry for only now realising that accessing the error code and message have also changed 🙈 , e.g. |
@thorsten-stripe No problem, I've changed the error / message accessing to the new method too :) |
hibariya
added a commit
to hibariya/accept-a-card-payment
that referenced
this pull request
May 6, 2021
* Use `isset` to suppress warning messages * Hard-code the logger name because `$c->get('settings')['logger']` was `NULL` * Updated stripe-php to the latest version to fix TypeError below > web_1 | Type: TypeError > web_1 | Message: array_key_exists(): Argument stripe-archive#2 ($array) must be of type array, Stripe\Util\CaseInsensitiveArray given > web_1 | File: /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiRequestor.php > web_1 | Line: 402 > web_1 | Trace: #0 /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiRequestor.php(402): array_key_exists('request-id', Object(Stripe\Util\CaseInsensitiveArray)) > web_1 | stripe-archive#1 /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiRequestor.php(125): Stripe\ApiRequestor->_requestRaw('post', '/v1/payment_int...', Array, Array) > web_1 | stripe-archive#2 /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiOperations/Request.php(57): Stripe\ApiRequestor->request('post', '/v1/payment_int...', Array, Array) > web_1 | stripe-archive#3 /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiOperations/Create.php(23): Stripe\ApiResource::_staticRequest('post', '/v1/payment_int...', Array, NULL) > web_1 | stripe-archive#4 /work/decline-on-card-authentication/server/php-slim/index.php(59): Stripe\PaymentIntent::create(Array) > web_1 | stripe-archive#5 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Array) > web_1 | stripe-archive#6 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array) > web_1 | stripe-archive#7 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array) > web_1 | stripe-archive#8 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | stripe-archive#9 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | stripe-archive#10 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | stripe-archive#11 /work/decline-on-card-authentication/server/php-slim/index.php(32): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | stripe-archive#12 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App)) > web_1 | stripe-archive#13 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array) > web_1 | stripe-archive#14 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App)) > web_1 | stripe-archive#15 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App)) > web_1 | stripe-archive#16 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | stripe-archive#17 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | stripe-archive#18 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | stripe-archive#19 /work/decline-on-card-authentication/server/php-slim/index.php(86): Slim\App->run()
cjavilla-stripe
pushed a commit
that referenced
this pull request
May 6, 2021
* Not necessary for CI anymore * Fix php-slim samples * Use `isset` to suppress warning messages * Hard-code the logger name because `$c->get('settings')['logger']` was `NULL` * Updated stripe-php to the latest version to fix TypeError below > web_1 | Type: TypeError > web_1 | Message: array_key_exists(): Argument #2 ($array) must be of type array, Stripe\Util\CaseInsensitiveArray given > web_1 | File: /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiRequestor.php > web_1 | Line: 402 > web_1 | Trace: #0 /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiRequestor.php(402): array_key_exists('request-id', Object(Stripe\Util\CaseInsensitiveArray)) > web_1 | #1 /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiRequestor.php(125): Stripe\ApiRequestor->_requestRaw('post', '/v1/payment_int...', Array, Array) > web_1 | #2 /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiOperations/Request.php(57): Stripe\ApiRequestor->request('post', '/v1/payment_int...', Array, Array) > web_1 | #3 /work/decline-on-card-authentication/server/php-slim/vendor/stripe/stripe-php/lib/ApiOperations/Create.php(23): Stripe\ApiResource::_staticRequest('post', '/v1/payment_int...', Array, NULL) > web_1 | #4 /work/decline-on-card-authentication/server/php-slim/index.php(59): Stripe\PaymentIntent::create(Array) > web_1 | #5 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Array) > web_1 | #6 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array) > web_1 | #7 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array) > web_1 | #8 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | #9 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | #10 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | #11 /work/decline-on-card-authentication/server/php-slim/index.php(32): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | #12 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App)) > web_1 | #13 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array) > web_1 | #14 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App)) > web_1 | #15 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App)) > web_1 | #16 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | #17 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | #18 /work/decline-on-card-authentication/server/php-slim/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response)) > web_1 | #19 /work/decline-on-card-authentication/server/php-slim/index.php(86): Slim\App->run() * Just confirm that error is displayed since the message could change * Fix the php samples as well
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changed card exception to newer reference to prevent errors.