Crates.io | stripe-update-card |
lib.rs | stripe-update-card |
version | 1.1.2 |
source | src |
created_at | 2018-06-09 22:42:46.871035 |
updated_at | 2018-06-12 06:39:39.608807 |
description | 💳 Stripe update card page |
homepage | https://github.com/FGRibreau/stripe-update-card |
repository | https://github.com/FGRibreau/stripe-update-card |
max_upload_size | |
id | 69400 |
size | 11,555 |
Expose a page that let your customers update their payment information on Stripe.
docker run -it \
-e STRIPE_PUBLISHABLE_KEY=pk_test_xxx \
-e STRIPE_SECRET_KEY=sk_test_xxx \
-e SUCCESS_REDIRECT_URL=https://url.to.redirect/on/success \
-p 8080:8080 \
fgribreau/stripe-update-card
# open payment update page for customer id: cus_D1Cj3rjHrjPQg5
open http://localhost:8080/cus_XXXXXXXXXXXX
Don't forget to change cus_XXXXXXXXXXXX
with the Stripe customer id and then expose the URL http://sub.domain.tld/cus_XXXXXXXXXXXX
from your app.
Configuration is managed through environment variables, see .env.dist for the full-list.
# mandatory config
STRIPE_PUBLISHABLE_KEY=pk_test_xxxxxxxx
STRIPE_SECRET_KEY=sk_test_xxxx
SUCCESS_REDIRECT_URL=https://url.to.redirect/on/success
# optional config
PAGE_TITLE="Update Card"
FORM_DATA_IMAGE=/path/to/your/logo.png
FORM_DATA_NAME="The name of your company or website"
FORM_DATA_DESCRIPTION="A description of the product or service being purchased"
FORM_DATA_PANEL_LABEL="Update Card Details"
FORM_DATA_COLLECT_BILLING_ADDRESS=false
FORM_DATA_LABEL="Update Card Details"
FORM_DATA_ALLOW_REMEMBER_ME=false
FORM_DATA_LOCALE=auto
See stripe-update-card on docker hub.
cargo install stripe-update-card
Deploy it (the fastest way is to use Clever-cloud thanks to their awesome native Rust support)
Set environment variables
Don't forget to add "RUSTUP_CHANNEL=nightly" env. variable for Rocket
Done!
cargo install cargo-watch
cargo install cargo-release
source .env
# watch for changes and restart everytime
RUST_LOG=debug cargo watch -x run
Use Stripe test tokens
Use credit card number 4242 4242 4242 4242
and any date & CVV
This project use Travis-CI to run tests & do builds.
Required environment variables are: