Skip to content

Commit 36e0466

Browse files
committed
rename namespace
1 parent b43eaa7 commit 36e0466

28 files changed

+151
-86
lines changed

.github/FUNDING.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github: Finller
1+
github: Elegant

.github/ISSUE_TEMPLATE/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Ask a question
4-
url: https://github.com/Finller/laravel-stripe/discussions/new?category=q-a
4+
url: https://github.com/ElegantEngineeringTech/laravel-stripe/discussions/new?category=q-a
55
about: Ask the community for help
66
- name: Request a feature
7-
url: https://github.com/Finller/laravel-stripe/discussions/new?category=ideas
7+
url: https://github.com/ElegantEngineeringTech/laravel-stripe/discussions/new?category=ideas
88
about: Share ideas for new features
99
- name: Report a security issue
10-
url: https://github.com/Finller/laravel-stripe/security/policy
10+
url: https://github.com/ElegantEngineeringTech/laravel-stripe/security/policy
1111
about: Learn how to notify us for sensitive bugs

CHANGELOG.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@ All notable changes to `laravel-stripe` will be documented in this file.
44

55
## v1.0.3 - 2024-03-24
66

7-
**Full Changelog**: https://github.com/finller/laravel-stripe/compare/v1.0.2...v1.0.3
7+
**Full Changelog**: https://github.com/ElegantEngineeringTech/laravel-stripe/compare/v1.0.2...v1.0.3
88

99
## v1.0.2 - 2024-03-24
1010

11-
**Full Changelog**: https://github.com/finller/laravel-stripe/compare/v1.0.1...v1.0.2
11+
**Full Changelog**: https://github.com/ElegantEngineeringTech/laravel-stripe/compare/v1.0.1...v1.0.2
1212

1313
## v1.0.1 - 2024-03-24
1414

15-
**Full Changelog**: https://github.com/finller/laravel-stripe/compare/v1.0.0...v1.0.1
15+
**Full Changelog**: https://github.com/ElegantEngineeringTech/laravel-stripe/compare/v1.0.0...v1.0.1
1616

1717
## v1.0.0 - 2024-03-20
1818

19-
**Full Changelog**: https://github.com/finller/laravel-stripe/compare/v0.0.4...v1.0.0
19+
**Full Changelog**: https://github.com/ElegantEngineeringTech/laravel-stripe/compare/v0.0.4...v1.0.0
2020

2121
## v0.0.4 - 2024-03-19
2222

23-
**Full Changelog**: https://github.com/finller/laravel-stripe/compare/v0.0.3...v0.0.4
23+
**Full Changelog**: https://github.com/ElegantEngineeringTech/laravel-stripe/compare/v0.0.3...v0.0.4
2424

2525
## v0.0.3 - 2024-03-19
2626

27-
**Full Changelog**: https://github.com/finller/laravel-stripe/compare/v0.0.2...v0.0.3
27+
**Full Changelog**: https://github.com/ElegantEngineeringTech/laravel-stripe/compare/v0.0.2...v0.0.3
2828

2929
## v0.0.2 - 2024-03-19
3030

31-
**Full Changelog**: https://github.com/finller/laravel-stripe/compare/v0.0.1...v0.0.2
31+
**Full Changelog**: https://github.com/ElegantEngineeringTech/laravel-stripe/compare/v0.0.1...v0.0.2

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) Finller <[email protected]>
3+
Copyright (c) Elegant <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+66-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
# Stripe and Stripe Connect for your Laravel App
22

3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/finller/laravel-stripe.svg?style=flat-square)](https://packagist.org/packages/finller/laravel-stripe)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/finller/laravel-stripe/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/finller/laravel-stripe/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/finller/laravel-stripe/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/finller/laravel-stripe/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6-
[![Total Downloads](https://img.shields.io/packagist/dt/finller/laravel-stripe.svg?style=flat-square)](https://packagist.org/packages/finller/laravel-stripe)
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/elegant/laravel-stripe.svg?style=flat-square)](https://packagist.org/packages/elegant/laravel-stripe)
4+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/elegant/laravel-stripe/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/ElegantEngineeringTech/laravel-stripe/actions?query=workflow%3Arun-tests+branch%3Amain)
5+
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/elegant/laravel-stripe/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/ElegantEngineeringTech/laravel-stripe/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/elegant/laravel-stripe.svg?style=flat-square)](https://packagist.org/packages/elegant/laravel-stripe)
77

8-
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
8+
A simple way to attach Stripe Customer and Account to your Model in Laravel.
9+
10+
- Stripe webhooks ready to use out of the box
11+
- Access Stripe php sdk easily
912

1013
## Installation
1114

1215
You can install the package via composer:
1316

1417
```bash
15-
composer require finller/laravel-stripe
18+
composer require elegant/laravel-stripe
1619
```
1720

1821
You should publish and run the migrations with:
@@ -32,18 +35,70 @@ php artisan vendor:publish --tag="stripe-config"
3235
This is the contents of the published config file:
3336

3437
```php
38+
use Elegant\Stripe\Commands\CreateStripeWebhooksCommand;
39+
use Elegant\Stripe\ModelRepository;
40+
3541
return [
36-
];
37-
```
3842

39-
Optionally, you can publish the views using
43+
'models' => [
44+
'accounts' => [
45+
\App\Models\User::class,
46+
],
47+
'customers' => [
48+
\App\Models\User::class,
49+
],
50+
'repository' => ModelRepository::class,
51+
],
52+
53+
'cache' => [
54+
'accounts' => true,
55+
'customers' => false,
56+
],
57+
58+
'key' => env('STRIPE_KEY'),
59+
60+
'secret' => env('STRIPE_SECRET'),
61+
62+
'version' => env('STRIPE_VERSION', '2024-04-10'),
63+
64+
/**
65+
* This is only used for the CreateStripeWebhooksCommand
66+
* You can add more webhooks directly from your Stripe Dashboard
67+
*/
68+
'webhooks' => [
69+
[
70+
'url' => '/webhooks/stripe',
71+
'connect' => false,
72+
'enabled_events' => [
73+
...CreateStripeWebhooksCommand::DEFAULT_WEBHOOKS_EVENTS,
74+
],
75+
],
76+
],
77+
78+
];
4079

41-
```bash
42-
php artisan vendor:publish --tag="laravel-stripe-views"
4380
```
4481

4582
## Prepare your model
4683

84+
### Setup your database
85+
86+
This package simply rely on columns you have to add to any Model having a stripe customer or account.
87+
To do so, we provide a mirgation that will automatically add the required columns to your models.
88+
To configure what models are related to stripe, you must edit the configs.
89+
90+
### Add the right trait
91+
92+
Add `HasStripeCustomer` trait to your Model:
93+
94+
```php
95+
class Organization extends Model
96+
{
97+
use HasStripeCustomer;
98+
// ...
99+
}
100+
```
101+
47102
## Configure Webhooks
48103

49104
### Configure Webhooks on Stripe

composer.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "finller/laravel-stripe",
2+
"name": "elegant/laravel-stripe",
33
"description": "Stripe and Stripe Connect for your Laravel App",
44
"keywords": [
5-
"Finller",
5+
"Elegant",
66
"laravel",
77
"laravel-stripe"
88
],
9-
"homepage": "https://github.com/finller/laravel-stripe",
9+
"homepage": "https://github.com/ElegantEngineeringTech/laravel-stripe",
1010
"license": "MIT",
1111
"authors": [
1212
{
@@ -36,13 +36,13 @@
3636
},
3737
"autoload": {
3838
"psr-4": {
39-
"Finller\\Stripe\\": "src/",
40-
"Finller\\Stripe\\Database\\Factories\\": "database/factories/"
39+
"Elegant\\Stripe\\": "src/",
40+
"Elegant\\Stripe\\Database\\Factories\\": "database/factories/"
4141
}
4242
},
4343
"autoload-dev": {
4444
"psr-4": {
45-
"Finller\\Stripe\\Tests\\": "tests/",
45+
"Elegant\\Stripe\\Tests\\": "tests/",
4646
"Workbench\\App\\": "workbench/app/"
4747
}
4848
},
@@ -74,10 +74,10 @@
7474
"extra": {
7575
"laravel": {
7676
"providers": [
77-
"Finller\\Stripe\\StripeServiceProvider"
77+
"Elegant\\Stripe\\StripeServiceProvider"
7878
],
7979
"aliases": {
80-
"Stripe": "Finller\\Stripe\\Facades\\Stripe"
80+
"Stripe": "Elegant\\Stripe\\Facades\\Stripe"
8181
}
8282
}
8383
},

config/stripe.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22

3-
// config for Finller/Stripe
4-
5-
use Finller\Stripe\Commands\CreateStripeWebhooksCommand;
6-
use Finller\Stripe\ModelRepository;
3+
use Elegant\Stripe\Commands\CreateStripeWebhooksCommand;
4+
use Elegant\Stripe\ModelRepository;
75

86
return [
97

database/factories/ModelFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Finller\Stripe\Database\Factories;
3+
namespace Elegant\Stripe\Database\Factories;
44

55
use Illuminate\Database\Eloquent\Factories\Factory;
66

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
backupStaticProperties="false"
1717
>
1818
<testsuites>
19-
<testsuite name="Finller Test Suite">
19+
<testsuite name="Elegant Test Suite">
2020
<directory>tests</directory>
2121
</testsuite>
2222
</testsuites>

src/Commands/CreateStripeWebhooksCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
namespace Finller\Stripe\Commands;
3+
namespace Elegant\Stripe\Commands;
44

5-
use Finller\Stripe\Facades\Stripe;
5+
use Elegant\Stripe\Facades\Stripe;
66
use Illuminate\Console\Command;
77

88
class CreateStripeWebhooksCommand extends Command
@@ -31,7 +31,7 @@ public function handle(): int
3131
'url' => url(data_get($webhook, 'url')),
3232
'api_version' => data_get($webhook, 'api_version', config('stripe.version')),
3333
'connect' => data_get($webhook, 'connect'),
34-
'description' => data_get($webhook, 'description', 'Created with finller/laravel-stripe'),
34+
'description' => data_get($webhook, 'description', 'Created with elegant/laravel-stripe'),
3535
]));
3636

3737
$stripe->webhookEndpoints->update($stripeWebhook->id, [

src/EventServiceProvider.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace Finller\Stripe;
3+
namespace Elegant\Stripe;
44

5-
use Finller\Stripe\Listeners\AccountApplicationDeauthorized;
6-
use Finller\Stripe\Listeners\AccountUpdated;
7-
use Finller\Stripe\Listeners\CustomerDeleted;
8-
use Finller\Stripe\Listeners\CustomerUpdated;
5+
use Elegant\Stripe\Listeners\AccountApplicationDeauthorized;
6+
use Elegant\Stripe\Listeners\AccountUpdated;
7+
use Elegant\Stripe\Listeners\CustomerDeleted;
8+
use Elegant\Stripe\Listeners\CustomerUpdated;
99
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
1010

1111
class EventServiceProvider extends ServiceProvider

src/Facades/Stripe.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?php
22

3-
namespace Finller\Stripe\Facades;
3+
namespace Elegant\Stripe\Facades;
44

55
use Illuminate\Support\Facades\Facade;
66

77
/**
8-
* @see \Finller\Stripe\Stripe
8+
* @see \Elegant\Stripe\Stripe
99
*
1010
* @method static \Stripe\StripeClient client()
1111
*/
1212
class Stripe extends Facade
1313
{
1414
protected static function getFacadeAccessor()
1515
{
16-
return \Finller\Stripe\Stripe::class;
16+
return \Elegant\Stripe\Stripe::class;
1717
}
1818
}

0 commit comments

Comments
 (0)