--- title: Identity verification (redirect) route: /samples/identity/redirect --- # Identity verification (redirect) # Identity verification The redirect integration decreases the amount of private information you handle on your site, allows you to support users in a variety of platforms and languages, and allows you to customize the style to match your branding. For an integration solution that allows more customization, see the [modal integration](https://docs.stripe.com/samples/identity/modal.md). ```html
.env
Make a copy of .env.example
, place it in the same directory as composer.json, and name it .env
, then populate the variables.
It should look something like the following, but contain your API keys:
STRIPE_PUBLISHABLE_KEY=pk_test... STRIPE_SECRET_KEY=sk_test... STRIPE_WEBHOOK_SECRET=whsec_... DOMAIN=http://localhost:4242
You can use this command to get started:
cp .env.example .envload(); // Make sure the configuration file is good. if (!$_ENV['STRIPE_SECRET_KEY']) { ?>
.env
Make a copy of .env.example
and name it .env
, then populate the variables.
It should look something like the following, but contain your API keys:
STRIPE_PUBLISHABLE_KEY=pk_test... STRIPE_SECRET_KEY=sk_test... STRIPE_WEBHOOK_SECRET=whsec_... DOMAIN=http://localhost:4242
You can use this command to get started:
cp .env.example .env", "0.0.2", "https://github.com/stripe-samples" ); $stripe = new \Stripe\StripeClient([ 'api_key' => $_ENV['STRIPE_SECRET_KEY'], 'stripe_version' => '2020-08-27', ]); ``` ```js // Helper for displaying status messages. const addMessage = (message) => { const messagesDiv = document.querySelector('#messages'); messagesDiv.style.display = 'block'; const messageWithLinks = addDashboardLinks(message); messagesDiv.innerHTML += `> ${messageWithLinks}