30 SPF Classic Sample

€ 1.95 EUR

30 SPF Classic Sample

Try out best seller sunscreen!

  • How to use

  • Ingredients

Buy now
# This example sets up an endpoint using the Sinatra framework. # Watch this video to get started: https://youtu.be/8aA9Enb8NVc. require 'json' require 'sinatra' require 'stripe' # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys Stripe.api_key = 'sk_test_51Hmv40JbrUw86msZ66...8y99rxzQI00tQu0tdzY''sk_test_51Hmv40JbrUw86msZ6676wuxyvUmnPINiKIftzWr7AypHuDlWzMGjBJJszihVl1KWSr27hvvZ5VBnkI48y99rxzQI00tQu0tdzY' post '/create-checkout-session' do session = Stripe::Checkout::Session.create({ line_items: [{ price_data: { currency: 'usd', product_data: { name: 'T-shirt', }, unit_amount: 2000, }, quantity: 1, }], mode: 'payment', # These placeholder URLs will be replaced in a following step. success_url: 'https://example.com/success', cancel_url: 'https://example.com/cancel', }) redirect session.url, 303 end