Provides Simple Integration of Stripe Forms
When integrating Stripe in your blade views wouldn't it be awesome to just say {{ StripeForm::build(25) }}
and have a full Stripe.js enabled form embedded with a charge of $25?, (*1)
Well, that's what we are setting out to accomplish in this new package., (*2)
Getting to this awesome syntax is gonna take some coding, but we've already started making things easier for those of you who want to integrate a Stripe Connect button in your application!, (*3)
Include this package in your composer.json rtablada/stripe-forms
., (*4)
Then pull in and update your config file: php artisan config:publish rtablada/stripe-forms
., (*5)
In your App config add this to your Service Providers: 'Rtablada\StripeForms\StripeFormsServiceProvider',
, (*6)
In your App config add this to your Facades: 'ConnectButton' => 'Rtablada\StripeForms\StripeConnectButtonFacade',
, (*7)
Instead of worrying about the ugly syntax of creating an anchor tag with a long query string to build your Stripe Connect buttons, you can just use this builder., (*8)
ConnectButton::button()
, (*9)
Or for rapid prototyping, you can use ConnectButton::buttonWithStyle()
to dump the required style in-line, (*10)
In combination with some of the other Stripe packages I am working with, I have made it so that a stripe.php config file can be shared with the other packages. Currently all that is needed is a 'clientId' property in the array., (*11)