stripe-php | Short PHP scripts that use Stripe to charge CCs | Ecommerce library
kandi X-RAY | stripe-php Summary
kandi X-RAY | stripe-php Summary
Short PHP scripts that use Stripe to charge CCs.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stripe-php
stripe-php Key Features
stripe-php Examples and Code Snippets
Community Discussions
Trending Discussions on stripe-php
QUESTION
I set up the payment gateway using Stripe. but for some unknown reason, it is throwing up an error.
Uncaught (Status 400) (Request req_0TGBfaSh8o6dTn) Invalid object thrown in stripe-php-master\lib\Exception\ApiErrorException.php
Here is my code
...ANSWER
Answered 2021-May-19 at 19:28The address
parameter is expected to have nested child parameters for each of line1
,city
, etc.
https://stripe.com/docs/api/customers/create?lang=php#create_customer-address
QUESTION
I'm using Stripe's PHP SDK in a Laravel project, and I'm having a weird issue with 3d secure payments.
PHP Version : 7.4 Stripe-PHP : 7.75.0
When creating a PaymentIntent on behlaf of a connected stripe account using the stripe_account
parameter, and the confirmation_method: 'manual'
parameter, there's alway an error stating:
This PaymentIntent pi_XXXXXX cannot be confirmed using your publishable key because its
confirmation_method
is set tomanual
. Please use your secret key instead, or create a PaymentIntent withconfirmation_method
set toautomatic
.
This is how I created my intent:
...ANSWER
Answered 2021-Apr-08 at 16:38In order to perform server-side (manual) confirmation, you want to follow this doc. Specifically, instead of using handleCardPayment
on the frontend, you use createPaymentMethod
on the frontend, use the resulting PaymentMethod with a PaymentIntent on the backend, and then confirm on the backend. The linked doc shows the exact steps.
And for the 3d secure, you need to add handleCardPayment
.
QUESTION
I'm trying to catch errors in codeigniter 3 by using stripe php library (last version) So, when I use a correct testing card number the payment goes ok, but when I use a test declined card number for testing purposes I'm getting the error: Type: Stripe\Exception\CardException
Message: Your card was declined.enter image description here
Filename: /opt/lampp/htdocs/plataforma_asociaciones/application/third_party/stripe-php-old/lib/Exception/ApiErrorException.php
Line Number: 38
Backtrace:
File: /opt/lampp/htdocs/plataforma_asociaciones/application/third_party/stripe-php-old/lib/Exception/CardException.php Line: 38 Function: factory
File: /opt/lampp/htdocs/plataforma_asociaciones/application/third_party/stripe-php-old/lib/ApiRequestor.php Line: 195 Function: factory
...ANSWER
Answered 2021-Mar-29 at 22:47It looks like your code is only catching a subset of all possible errors. Have a look at the PHP error handling sample snippet in the Stripe API reference:
QUESTION
I'm a total newbie and I'm merely piecing tutorials and use cases together to speed up my understanding of this new field, so apologies for not knowing what's going on.
Anyway, here's the situation: I'm using xampp as a test server to create a database driven website that includes a login page, a search page, and a profile page where you can subscribe to recurring packages using Stripe's API.
Following Stripe's instructions here: https://stripe.com/docs/billing/subscriptions/checkout, I copied all the code from Github to take care of step 4 and refreshed the index page, just to kind of see if there's something going on. I ended up getting this error:
...ANSWER
Answered 2021-Mar-25 at 23:11The reason you're seeing that error is that you only copied the index.php
code, which is not designed to work in isolation. That code has dependencies, one of which being Dotenv
, that needs to be installed using Composer.
In order to get that sample code working you need to download all the code and follow the instructions noted in the php-slim
folder:
- Run
composer install
to install the dependencies - Start the test PHP server locally:
php -S localhost:4242 index.php
- Open http://localhost:4242 in your browser
QUESTION
I need to install guzzlehttp/guzzle to work with stripe in laravel 5.8 app but I got
error with installing :
...ANSWER
Answered 2021-Mar-23 at 11:50You have to update the version of your guzzlehttp/guzzle becasue it is required by php version
Try to Change "guzzlehttp/guzzle": "^5.x"
to this "guzzlehttp/guzzle": "^7.2.0"
and then run composer update
and your current php version is ^7.2
you can find more about it in here https://packagist.org/packages/guzzlehttp/guzzle#6.5.5
QUESTION
Sometimes when Travis CI is building my package, there's a short list of dependencies, like so:
...ANSWER
Answered 2021-Mar-16 at 22:15Travis CI keeps a cache of your vendor folder in order to make builds run quicker (and reduce unnecessary traffic for them). If you've made some changes to your composer.lock
file Travis CI may need to update the files stored in the vendor folder.
Other times it won't need to do this, and so will have a shorter build time.
QUESTION
In laravel 5.8 app with stripe/stripe-php: ^7.50 when customer pays fir provided services it has code:
...ANSWER
Answered 2021-Mar-16 at 08:11You can use the Balance API to retrieve that: https://stripe.com/docs/api/balance
You need to catch errors in your Charge::create: https://stripe.com/docs/api/errors/handling?lang=php
Also you should consider using Payment Intents instead of Charges: https://stripe.com/docs/payments/payment-intents/migration
QUESTION
I am working on Cake PHP Ftramework. My task is to verify if a transaction is genuine. I am trying the following with transaction ID (recieved when payment success).
...ANSWER
Answered 2021-Feb-16 at 14:18In this case to retrieve the PaymentIntent from the API using a pi_xxx PaymentIntent ID, then the PHP code to do this is [1]:
QUESTION
I wanted to install a new package in a Laravel 7 application. I have tried direct composer require command and tried manually entering package name and updating composer command but both times it returns error as follows. while using command 'composer require simplesoftwareio/simple-qrcode'
...ANSWER
Answered 2021-Jan-20 at 10:05chumper/zipper v1.0.0 requires illuminate/support 5.x
is the most important part of that output: the given package is only compatibel with Laravel v5, while your composer.json
contains the requirement "laravel/framework": "^7.0"
QUESTION
I am helping someone install E-Directory. It's overall a buggy app.
composer.json
...ANSWER
Answered 2021-Jan-15 at 09:25Requiring both "symfony/symfony": "^2.8.*"
and "symfony/console": "^3.0"
does not work, as symfony/console
is a component that is also part of symfony/symfony
. You need to get rid of one of this requirements.
If you face any further problems, please share the error message occurring after this first fix
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stripe-php
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page