Stripe
Stripe Payment with Curl Functions :-)
- Sign up or log into your dashboard
- Click on your profile and click on Account Settings
- Then click on API Keys
- Copy the Secret Key. and add this into
DB
or.ENV
file
You can sign up for a Stripe account at https://stripe.com.
Requirements
PHP 5.4.0 and later.
Composer
You can install the bindings via Composer. Run the following command:
composer require stripe/stripe-php
Dependencies
The bindings require the following extensions in order to work properly:
curl
, although you can use your own non-cURL client if you prefer
json
mbstring
(Multibyte String)
If you use Composer, these dependencies should be handled automatically. If you install manually, you’ll want to make sure that these extensions are available.
Getting Started Simple usage looks like:
\Stripe\Stripe::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
$charge = \Stripe\Charge::create(['amount' => 2000, 'currency' => 'usd', 'source' => 'tok_189fqt2eZvKYlo2CTGBeg6Uq']);
echo $charge;
Documentation Please see https://stripe.com/docs/api for up-to-date documentation.