Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/md-aamroni/stripe
Stripe API Payment in Laravel
https://github.com/md-aamroni/stripe
stripe stripe-api stripe-checkout
Last synced: about 1 month ago
JSON representation
Stripe API Payment in Laravel
- Host: GitHub
- URL: https://github.com/md-aamroni/stripe
- Owner: md-aamroni
- License: mit
- Created: 2024-04-01T18:19:54.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-04-01T19:47:35.000Z (9 months ago)
- Last Synced: 2024-05-02T23:52:00.814Z (8 months ago)
- Topics: stripe, stripe-api, stripe-checkout
- Language: PHP
- Homepage:
- Size: 17.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
### Install
```shell
composer require aamroni/stripe
```### Config Example
Collect your public and secret keys, and configure as necessary in config/payment.php```php
'stripe' => [
'public' => env('STRIPE_PUBLIC_KEY'),
'secret' => env('STRIPE_SECRET_KEY'),
'redirect' => [
'success' => 'http://localhost:8000/stripe/success',
'cancel' => 'http://localhost:8000/stripe/cancel'
],
'currency' => 'USD'
]
```### Checkout Example
```php
checkout($customer, $purchase);dd($stripe);
```### Customer Example
```php
create(CustomerEntity: $customer); // Create a customer information
$response = $instance->delete(); // Delete a customer information
$response = $instance->record(); // Fetch all customer information
$response = $instance->record(id: $id); // Fetch a specific customer informationdd($response);
```### Purchase Example
```php
create(PurchaseEntity: $purchase); // Create a purchase information
$response = $instance->record(); // Fetch all purchase information
$response = $instance->record(id: $id); // Fetch a specific purchase informationdd($response);
```