From c8b3b95d742a9803321394620325ca767d0a41f4 Mon Sep 17 00:00:00 2001 From: Rishabh Saxena Date: Sun, 31 Jul 2016 23:58:25 +0530 Subject: [PATCH 1/5] add documentation for Stripe configuration --- INSTALL.md | 8 +++++++- PAYMENTS.md | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 PAYMENTS.md diff --git a/INSTALL.md b/INSTALL.md index f53cebc6..cfb760a1 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -46,7 +46,13 @@ There are a couple of environment variables you can set to configure OSEM. | OSEM_SMTP_PASSWORD | *string* | The password for the smtp server | OSEM_SMTP_AUTHENTICATION | plain, login or cram_md5 | The auth method for the smtp server | OSEM_SMTP_DOMAIN | opensuse.org | The HELO domain for the smtp server -| CLOUDINARY_URL | *sting* | Configure your cloudinary.com cloud name and api key/secret +| CLOUDINARY_URL | *string* | Configure your cloudinary.com cloud name and api key/secret +| STRIPE_PUBLISHABLE_KEY/STRIPE_SECRET_KEY | *string* | Publishable/Secret Keys for Stripe Gateway + +### Online Ticket Payments +We use [Stripe](https://stripe.com) for accepting your ticket payments securely over the web. +Our application uses iFrame for accepting your user's payment details without storing them making the application PCI SAQ-A Compliant. +Please refer to [PAYMENTS](PAYMENTS.md) documentation file for setting up your stripe account and start accepting payments from your users. ## Dependencies diff --git a/PAYMENTS.md b/PAYMENTS.md new file mode 100644 index 00000000..f6fddf6b --- /dev/null +++ b/PAYMENTS.md @@ -0,0 +1,27 @@ +# Integrate your Stripe account to accept your user's payments +All the information that you need to setup your Stripe account into OSEM. +If you have any problems with installing don't hesitate to [contact us](https://github.com/openSUSE/osem#contact) + +## Configure Stripe into the application +To configure Stripe into your application all you need to do is add the private and publishable keys into the Rails environment. + +You can add the your keys in `dotenv.example` and in `config/secrets.yml` into these variables: + +If you are using the application in development mode your config should look like this: + `STRIPE_PUBLISHABLE_KEY = 'pk_test_random123example456'` + `STRIPE_SECRET_KEY = 'sk_test_random123example456'` + +Otherwise, while in production mode, it should look like: + `STRIPE_PUBLISHABLE_KEY = 'pk_live_random123example456'` + `STRIPE_SECRET_KEY = 'sk_live_random123example456'` + +## Configure image for your iFrame payment form +The stripe payment form uses an image of your organisation to display a personalised iFrame form for your application. +by default, the application comes with a SUSE icon, but, you can display the image of your organisation in place of that +by replacing the image of your organisation at `app/assets/images/OSEM_ICON.jpg` to an image of your organisation. + +## Configure Stripe to send custom emails for your organisation +Stripe sends email reciepts for every successful payment done through its gateway. +You can also customise your payment reciepts by adding your personalisation like organisation name, logo etc. + +You can see the options for personalisation [here](https://dashboard.stripe.com/account/public). From f40caa8b24252bb6b8d38098ec01bb9611e7a37a Mon Sep 17 00:00:00 2001 From: Rishabh Saxena Date: Wed, 3 Aug 2016 00:25:56 +0530 Subject: [PATCH 2/5] improve documentation --- INSTALL.md | 1 + PAYMENTS.md | 13 +++++++------ dotenv.example | 3 +++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index cfb760a1..a97bf670 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -48,6 +48,7 @@ There are a couple of environment variables you can set to configure OSEM. | OSEM_SMTP_DOMAIN | opensuse.org | The HELO domain for the smtp server | CLOUDINARY_URL | *string* | Configure your cloudinary.com cloud name and api key/secret | STRIPE_PUBLISHABLE_KEY/STRIPE_SECRET_KEY | *string* | Publishable/Secret Keys for Stripe Gateway +| OSEM_ICON | *string* | Sharable link for your organisation's icon ### Online Ticket Payments We use [Stripe](https://stripe.com) for accepting your ticket payments securely over the web. diff --git a/PAYMENTS.md b/PAYMENTS.md index f6fddf6b..aa33f51f 100644 --- a/PAYMENTS.md +++ b/PAYMENTS.md @@ -5,20 +5,21 @@ If you have any problems with installing don't hesitate to [contact us](https:// ## Configure Stripe into the application To configure Stripe into your application all you need to do is add the private and publishable keys into the Rails environment. -You can add the your keys in `dotenv.example` and in `config/secrets.yml` into these variables: +Add your Stripe API keys in `config/secrets.yml` into these variables: If you are using the application in development mode your config should look like this: - `STRIPE_PUBLISHABLE_KEY = 'pk_test_random123example456'` - `STRIPE_SECRET_KEY = 'sk_test_random123example456'` + `STRIPE_PUBLISHABLE_KEY = 'pk_**test**_random123example456'` + `STRIPE_SECRET_KEY = 'sk_**test**_random123example456'` Otherwise, while in production mode, it should look like: - `STRIPE_PUBLISHABLE_KEY = 'pk_live_random123example456'` - `STRIPE_SECRET_KEY = 'sk_live_random123example456'` + `STRIPE_PUBLISHABLE_KEY = 'pk_**live**_random123example456'` + `STRIPE_SECRET_KEY = 'sk_**live**_random123example456'` ## Configure image for your iFrame payment form The stripe payment form uses an image of your organisation to display a personalised iFrame form for your application. by default, the application comes with a SUSE icon, but, you can display the image of your organisation in place of that -by replacing the image of your organisation at `app/assets/images/OSEM_ICON.jpg` to an image of your organisation. +by putting the link of your organisation's image in your corresponding `.env` file as follows: + `OSEM_ICON = 'your organisation's sharable image link'` ## Configure Stripe to send custom emails for your organisation Stripe sends email reciepts for every successful payment done through its gateway. diff --git a/dotenv.example b/dotenv.example index 921020d1..2ebab0ec 100644 --- a/dotenv.example +++ b/dotenv.example @@ -9,6 +9,9 @@ # The name of your page OSEM_NAME="OSEM" +# The shareable link of your organisation's icon image +OSEM_ICON='' + # The host this OSEM instance runs on. Used for # generating urls in emails sent OSEM_HOSTNAME="localhost:3000" From 4509bf09bb14df5bded8984a9c0758bc0e2ded51 Mon Sep 17 00:00:00 2001 From: Rishabh Saxena Date: Fri, 5 Aug 2016 01:17:25 +0530 Subject: [PATCH 3/5] add email-invoice documentation. correct language errors. --- INSTALL.md | 14 +++++++++----- PAYMENTS.md | 37 ++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index a97bf670..a5e1da5a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -37,9 +37,12 @@ There are a couple of environment variables you can set to configure OSEM. | OSEM_ERRBIT_HOST | errbit.opensuse.org | The [errbit](https://github.com/errbit/errbit) host to post exceptions to | | OSEM_ERRBIT_APIKEY | *string* | The api key for the errbit host | | OSEM_FACTORY_LINT | *boolean* (true/false) | Setting this to false will disable linting of factories before running spec -| OSEM_GOOGLE_KEY/OSEM_GOOGLE_SECRET | *string* | OMNIAUTH Developer Keys/Secrets for GOOGLE -| OSEM_FACEBOOK_KEY/OSEM_FACEBOOK_SECRET | *string* | OMNIAUTH Developer Keys/Secrets for Facebook -| OSEM_GITHUB_KEY/OSEM_GITHUB_SECRET |*string* | OMNIAUTH Developer Keys/Secrets for GitHub +| OSEM_GOOGLE_KEY | *string* | OMNIAUTH Developer Key for GOOGLE +| OSEM_GOOGLE_SECRET | *string* | OMNIAUTH Developer Secret for GOOGLE +| OSEM_FACEBOOK_KEY | *string* | OMNIAUTH Developer Key for Facebook +| OSEM_FACEBOOK_SECRET | *string* | OMNIAUTH Developer Secret for Facebook +| OSEM_GITHUB_KEY | *string* | OMNIAUTH Developer Key for GitHub +| OSEM_GITHUB_SECRET | *string* | OMNIAUTH Developer Secret for GitHub | OSEM_SMTP_ADDRESS | smtp.opensuse.org | The smtp server to use | OSEM_SMTP_PORT | *int* | The port on the smtp server | OSEM_SMTP_USERNAME | *string* | The user for the smtp server @@ -47,12 +50,13 @@ There are a couple of environment variables you can set to configure OSEM. | OSEM_SMTP_AUTHENTICATION | plain, login or cram_md5 | The auth method for the smtp server | OSEM_SMTP_DOMAIN | opensuse.org | The HELO domain for the smtp server | CLOUDINARY_URL | *string* | Configure your cloudinary.com cloud name and api key/secret -| STRIPE_PUBLISHABLE_KEY/STRIPE_SECRET_KEY | *string* | Publishable/Secret Keys for Stripe Gateway +| STRIPE_PUBLISHABLE_KEY | *string* | Publishable Key for Stripe Gateway +| STRIPE_SECRET_KEY | *string* | Secret Key for Stripe Gateway | OSEM_ICON | *string* | Sharable link for your organisation's icon ### Online Ticket Payments We use [Stripe](https://stripe.com) for accepting your ticket payments securely over the web. -Our application uses iFrame for accepting your user's payment details without storing them making the application PCI SAQ-A Compliant. +Our application uses iFrame for accepting your user's payment details without storing them, making the application PCI SAQ-A Compliant. Please refer to [PAYMENTS](PAYMENTS.md) documentation file for setting up your stripe account and start accepting payments from your users. ## Dependencies diff --git a/PAYMENTS.md b/PAYMENTS.md index aa33f51f..90474cc2 100644 --- a/PAYMENTS.md +++ b/PAYMENTS.md @@ -1,5 +1,5 @@ # Integrate your Stripe account to accept your user's payments -All the information that you need to setup your Stripe account into OSEM. +Here you will find all the information that you need to setup your Stripe account into OSEM. If you have any problems with installing don't hesitate to [contact us](https://github.com/openSUSE/osem#contact) ## Configure Stripe into the application @@ -8,21 +8,32 @@ To configure Stripe into your application all you need to do is add the private Add your Stripe API keys in `config/secrets.yml` into these variables: If you are using the application in development mode your config should look like this: - `STRIPE_PUBLISHABLE_KEY = 'pk_**test**_random123example456'` - `STRIPE_SECRET_KEY = 'sk_**test**_random123example456'` + `stripe_publishable_key = 'pk_**test**_random123example456'` + `stripe_secret_key = 'sk_**test**_random123example456'` Otherwise, while in production mode, it should look like: - `STRIPE_PUBLISHABLE_KEY = 'pk_**live**_random123example456'` - `STRIPE_SECRET_KEY = 'sk_**live**_random123example456'` + `stripe_publishable_key = 'pk_**live**_random123example456'` + `stripe_secret_key = 'sk_**live**_random123example456'` -## Configure image for your iFrame payment form -The stripe payment form uses an image of your organisation to display a personalised iFrame form for your application. -by default, the application comes with a SUSE icon, but, you can display the image of your organisation in place of that -by putting the link of your organisation's image in your corresponding `.env` file as follows: +### PCI Self Assessment Questionnaire(SAQ) +> As long as you serve your payment pages over TLS, and use either Checkout or Stripe.js +> as the only way of handling card information, Stripe automatically creates a prefilled SAQ A questionnaire for you, +> and you won’t need to undergo a PCI audit. If card data is stored or transferred through your servers, +> you are responsible for following PCI DSS guidelines for handling card data, and periodic audits by a PCI-certified auditor. + +As we are using Stripe Checkout for accepting payments, Stripe will help you for filling SAQ for your application. +You can read the full security documentation [here](https://stripe.com/docs/security). + +## Configure the image for your payment form +The Stripe payment form uses an image of your organisation to display a personalised form for your application. +By default, the application comes with a openSUSE icon, but you can display the image of your organisation in place of that +by putting the URL of your organisation's image in your corresponding `.env` file as follows: `OSEM_ICON = 'your organisation's sharable image link'` -## Configure Stripe to send custom emails for your organisation -Stripe sends email reciepts for every successful payment done through its gateway. -You can also customise your payment reciepts by adding your personalisation like organisation name, logo etc. +## Configure Stripe to send emails for successful transactions +Stripe can send email reciepts for every successful payment done through its gateway. +Please refer [here](https://dashboard.stripe.com/account/emails) to enable invoice emails for your users. -You can see the options for personalisation [here](https://dashboard.stripe.com/account/public). +## Customize Stripe invoice emails for your application +You can customise your payment reciepts by adding your personalisation like organisation name, logo etc. +Please see the options for invoice personalisation [here](https://dashboard.stripe.com/account/public). From 4147114e028aa39b9ec03a492a4fbfcb02f5e4a7 Mon Sep 17 00:00:00 2001 From: Rishabh Saxena Date: Thu, 11 Aug 2016 15:03:52 +0530 Subject: [PATCH 4/5] add test card docs --- PAYMENTS.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/PAYMENTS.md b/PAYMENTS.md index 90474cc2..c72a99e4 100644 --- a/PAYMENTS.md +++ b/PAYMENTS.md @@ -5,15 +5,22 @@ If you have any problems with installing don't hesitate to [contact us](https:// ## Configure Stripe into the application To configure Stripe into your application all you need to do is add the private and publishable keys into the Rails environment. -Add your Stripe API keys in `config/secrets.yml` into these variables: +Add your Stripe API keys in `.env` file into these variables: If you are using the application in development mode your config should look like this: - `stripe_publishable_key = 'pk_**test**_random123example456'` - `stripe_secret_key = 'sk_**test**_random123example456'` + `STRIPE_PUBLISHABLE_KEY = 'pk_**test**_random123example456'` + `STRIPE_SECRET_KEY = 'sk_**test**_random123example456'` +The application in development mode can be used to test the whole test feature but is still not ready to be used by your users. +You need to use the live API keys to use the payment feature in production mode. -Otherwise, while in production mode, it should look like: - `stripe_publishable_key = 'pk_**live**_random123example456'` - `stripe_secret_key = 'sk_**live**_random123example456'` +In production mode, it should look like: + `STRIPE_PUBLISHABLE_KEY = 'pk_**live**_random123example456'` + `STRIPE_SECRET_KEY = 'sk_**live**_random123example456'` +In this mode, you can start accepting payments from your users. + +## Testing feature in development mode +You can test the payment feature in development mode with some test cards. +Check out the list of test cards [here](https://stripe.com/docs/testing#cards). ### PCI Self Assessment Questionnaire(SAQ) > As long as you serve your payment pages over TLS, and use either Checkout or Stripe.js @@ -24,12 +31,6 @@ Otherwise, while in production mode, it should look like: As we are using Stripe Checkout for accepting payments, Stripe will help you for filling SAQ for your application. You can read the full security documentation [here](https://stripe.com/docs/security). -## Configure the image for your payment form -The Stripe payment form uses an image of your organisation to display a personalised form for your application. -By default, the application comes with a openSUSE icon, but you can display the image of your organisation in place of that -by putting the URL of your organisation's image in your corresponding `.env` file as follows: - `OSEM_ICON = 'your organisation's sharable image link'` - ## Configure Stripe to send emails for successful transactions Stripe can send email reciepts for every successful payment done through its gateway. Please refer [here](https://dashboard.stripe.com/account/emails) to enable invoice emails for your users. From 2605c8f2391b788f987b85b11e768342f37c6c7e Mon Sep 17 00:00:00 2001 From: Rishabh Saxena Date: Thu, 18 Aug 2016 15:31:34 +0530 Subject: [PATCH 5/5] docs/PAYMENTS: add API docs docs: remove OSEM_ICON docs --- INSTALL.md | 1 - PAYMENTS.md | 2 ++ dotenv.example | 3 --- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index a5e1da5a..cc363338 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -52,7 +52,6 @@ There are a couple of environment variables you can set to configure OSEM. | CLOUDINARY_URL | *string* | Configure your cloudinary.com cloud name and api key/secret | STRIPE_PUBLISHABLE_KEY | *string* | Publishable Key for Stripe Gateway | STRIPE_SECRET_KEY | *string* | Secret Key for Stripe Gateway -| OSEM_ICON | *string* | Sharable link for your organisation's icon ### Online Ticket Payments We use [Stripe](https://stripe.com) for accepting your ticket payments securely over the web. diff --git a/PAYMENTS.md b/PAYMENTS.md index c72a99e4..ea1d515b 100644 --- a/PAYMENTS.md +++ b/PAYMENTS.md @@ -4,6 +4,8 @@ If you have any problems with installing don't hesitate to [contact us](https:// ## Configure Stripe into the application To configure Stripe into your application all you need to do is add the private and publishable keys into the Rails environment. +You can register to Stripe [here](https://dashboard.stripe.com/register) and get your API keys for free. +**You need to set the API keys provided by Stripe into the application first to get the feature running.** Add your Stripe API keys in `.env` file into these variables: diff --git a/dotenv.example b/dotenv.example index 2ebab0ec..921020d1 100644 --- a/dotenv.example +++ b/dotenv.example @@ -9,9 +9,6 @@ # The name of your page OSEM_NAME="OSEM" -# The shareable link of your organisation's icon image -OSEM_ICON='' - # The host this OSEM instance runs on. Used for # generating urls in emails sent OSEM_HOSTNAME="localhost:3000"