Skip to content

Commit 5539ba7

Browse files
committed
paddle
1 parent 5338e7d commit 5539ba7

42 files changed

Lines changed: 241 additions & 145 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/Http/Controllers/Billing/BillingController.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ public function subscribe(Request $request): Response
6666

6767
$user = $request->user();
6868

69+
// Ensure user is created as Paddle customer first
70+
if (! $user->paddle_id) {
71+
$user->createAsCustomer();
72+
$user->refresh();
73+
}
74+
6975
$plan = $request->input('plan');
7076
$priceId = $plan === 'yearly'
7177
? config('subscription.yearly_price_id')

config/cashier.php

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Paddle Keys
8+
|--------------------------------------------------------------------------
9+
|
10+
| The Paddle seller ID and API key will allow your application to call
11+
| the Paddle API. The seller key is typically used when interacting
12+
| with Paddle.js, while the "API" key accesses private endpoints.
13+
|
14+
*/
15+
16+
'seller_id' => env('PADDLE_SELLER_ID'),
17+
18+
'client_side_token' => env('PADDLE_CLIENT_SIDE_TOKEN'),
19+
20+
'api_key' => env('PADDLE_AUTH_CODE') ?? env('PADDLE_API_KEY'),
21+
22+
'retain_key' => env('PADDLE_RETAIN_KEY'),
23+
24+
'webhook_secret' => env('PADDLE_WEBHOOK_SECRET'),
25+
26+
/*
27+
|--------------------------------------------------------------------------
28+
| Cashier Path
29+
|--------------------------------------------------------------------------
30+
|
31+
| This is the base URI path where Cashier's views, such as the webhook
32+
| route, will be available. You're free to tweak this path based on
33+
| the needs of your particular application or design preferences.
34+
|
35+
*/
36+
37+
'path' => env('CASHIER_PATH', 'paddle'),
38+
39+
/*
40+
|--------------------------------------------------------------------------
41+
| Cashier Webhook
42+
|--------------------------------------------------------------------------
43+
|
44+
| This is the base URI where webhooks from Paddle will be sent. The URL
45+
| built into Cashier Paddle is used by default; however, you can add
46+
| a custom URL when required for any application testing purposes.
47+
|
48+
*/
49+
50+
'webhook' => env('CASHIER_WEBHOOK'),
51+
52+
/*
53+
|--------------------------------------------------------------------------
54+
| Currency
55+
|--------------------------------------------------------------------------
56+
|
57+
| This is the default currency that will be used when generating charges
58+
| from your application. Of course, you are welcome to use any of the
59+
| various world currencies that are currently supported via Paddle.
60+
|
61+
*/
62+
63+
'currency' => env('CASHIER_CURRENCY', 'USD'),
64+
65+
/*
66+
|--------------------------------------------------------------------------
67+
| Currency Locale
68+
|--------------------------------------------------------------------------
69+
|
70+
| This is the default locale in which your money values are formatted in
71+
| for display. To utilize other locales besides the default en locale
72+
| verify you have the "intl" PHP extension installed on the system.
73+
|
74+
*/
75+
76+
'currency_locale' => env('CASHIER_CURRENCY_LOCALE', 'en'),
77+
78+
/*
79+
|--------------------------------------------------------------------------
80+
| Paddle Sandbox
81+
|--------------------------------------------------------------------------
82+
|
83+
| This option allows you to toggle between the Paddle live environment
84+
| and its sandboxed environment.
85+
|
86+
*/
87+
88+
'sandbox' => env('PADDLE_SANDBOX', false),
89+
90+
];

public/build/assets/animations-DDgZVZxl.js renamed to public/build/assets/animations-sCYi0OuB.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/appearance-CUbmIn0m.js renamed to public/build/assets/appearance-C40tT5N-.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/build/assets/arrow-left-DqbKTqH0.js renamed to public/build/assets/arrow-left-BvouqL-1.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)