yogesh-laravel / stripe
This package for implement stripe API's
dev-master
2022-09-16 16:04 UTC
Requires
- stripe/stripe-php: ^9.5
This package is not auto-updated.
Last update: 2024-05-04 17:37:12 UTC
README
If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.
your_Laravel_project/
vendor/
Install
Via Composer
$ composer require yogesh-laravel/stripe
$ composer dump-autoload
Add Environment Key STRIPE_SECRET_KEY in .env
Add Environment Key STRIPE_CURRENCY in .env
Usage
use yogeshlaravel\stripe\StripeHelper;
Plan API Use
StripeHelper::createPlan($amount,$product_name);
StripeHelper::updatePlan($stripe_price_id,$order_id);
StripeHelper::deletePlan($stripe_price_id);
Customer API Use
StripeHelper::addCustomer($user);
StripeHelper::updateCustomer($user);
StripeHelper::getCustomer($stripe_customer_id);
Card API Use
StripeHelper::createCard($stripe_customer_id, $card_token);
StripeHelper::allCards($stripe_customer_id,$limit);
StripeHelper::deleteCard($stripe_customer_id, $cardId);
Subscription API Use
StripeHelper::createSubscription($stripe_customer_id, $stripe_price_id);
StripeHelper::updateSubscription($stripe_subscription_id, $stripe_price_id);
StripeHelper::cancelSubscription($user);
Charge API Use
StripeHelper::createDirectCharge($cardToken, $amount, $desc=null);
StripeHelper::createCharge($stripe_customer_id, $cardId, $amount, $desc=null);
StripeHelper::createRefund($charge_id);
Price API Use
StripeHelper::createPrice($amount,$product_name);
Security
If you discover any security related issues, please email yrana8786@gmail.com instead of using the issue tracker.
Credits
- [kumarashok30592@gmail.com]