Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Improve the Cashier (Paddle) documentation #10135

Draft
wants to merge 2 commits into
base: 11.x
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cashier-paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ And now your subscription will get canceled at the end of its billing period.

Most operations to bill customers are performed using "checkouts" via Paddle's [Checkout Overlay widget](https://developer.paddle.com/build/checkout/build-overlay-checkout) or by utilizing [inline checkout](https://developer.paddle.com/build/checkout/build-branded-inline-checkout).

Before processing checkout payments using Paddle, you should define your application's [default payment link](https://developer.paddle.com/build/transactions/default-payment-link#set-default-link) in your Paddle checkout settings dashboard.
Before processing checkout payments using Paddle, you should define your application's [default payment link](https://developer.paddle.com/build/transactions/default-payment-link#set-default-link) in your Paddle checkout settings dashboard. On your application's side, this doesn't need to be anything more than a route pointing to a blank page including the `@paddleJS` directive in its head. The Paddle JavaScript library will take care of displaying the checkout modal if a transaction ID is passed by the `?_ptxn=` query string parameter, though do not need to handle checkout this way and this documentation won't refer to this method anymore; you just need to have this page because Paddle requires it.

<a name="overlay-checkout"></a>
### Overlay Checkout
Expand Down Expand Up @@ -695,7 +695,7 @@ To create a subscription, first retrieve an instance of your billable model from
use Illuminate\Http\Request;

Route::get('/user/subscribe', function (Request $request) {
$checkout = $request->user()->subscribe($premium = 12345, 'default')
$checkout = $request->user()->subscribe($premium = 'pri_123', 'default')
->returnTo(route('home'));

return view('billing', ['checkout' => $checkout]);
Expand All @@ -705,7 +705,7 @@ The first argument given to the `subscribe` method is the specific price the use

You may also provide an array of custom metadata regarding the subscription using the `customData` method:

$checkout = $request->user()->subscribe($premium = 12345, 'default')
$checkout = $request->user()->subscribe($premium = 'pri_123', 'default')
->customData(['key' => 'value'])
->returnTo(route('home'));

Expand Down