PHP code example of yaroslawww / laravel-cashier-tools
1. Go to this page and download the library: Download yaroslawww/laravel-cashier-tools library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yaroslawww / laravel-cashier-tools example snippets
$url = route('cpd.account.index');
$subscription->allowPromotionCodes()
->checkout([
'success_url' => StripeCheckoutUrlBuilder::prepareSuccessUrl($url),
'cancel_url' => StripeCheckoutUrlBuilder::prepareCancelUrl($url),
]);
$subscription->checkout([
'success_url' => StripeCheckoutUrlBuilder::make($url)
->withSessionId()
->useResultStatus('foo')
->url(),
'cancel_url' => StripeCheckoutUrlBuilder::make($url)
->useResultStatus('bar')
->url(),
]);
DashboardRouter::fromConfig()->productsUrl()
DashboardRouter::fromConfig()->productsUrl($stripeProduct->id)
(new DashboardRouter(true))->promotionCodesUrl($promotionCode->id)