<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
christianbraybrooke / stripe-laravel-payment-intents example snippets
use ChrisBraybrooke\LaravelStripePaymentIntent\Facades\StripePaymentIntent;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
StripePaymentIntent::dontSavePaymentRecords();
}
@paymentFields([
// Amount in lowest currency (pence, cents etc.).
// Currency in valid currency code.
// Success URL is the route we will post to completed form data to.
'amount' => 12500, 'currency' => 'GBP', 'successUrl' => route('payment.submit')
])
@endpaymentFields
// Somewhere towards the footer
@paymentScripts()
@endpaymentScripts
use ChrisBraybrooke\LaravelStripePaymentIntent\Facades\StripePaymentIntent;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// Will give the inputs on the payment form a class of: 'form-control'
StripePaymentIntent::setInputClass('form-control');
// Will change the colour of elements like the submit button.
StripePaymentIntent::setThemeColor('#efefef');
}
sh
php artisan vendor:publish --tag="payment-migrations"
php artisan migrate
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.