The EuRuKo Conf 2010 Application
Handles Euruko 2010 site and allows to register to both attendees and speakers and pay registration fee.
Make sure you have bundler gem installed:
gem install bundler
Step by Step
These are the steps to put up the application with fake data:
git clone git://github.com/bragi/euruko_app.git cd euruko_app gem install bundler # or sudo gem install bundler gem bundle cp certs/app_cert.pem_example certs/app_cert.pem cp certs/app_key.pem_example certs/app_key.pem cp certs/paypal_cert.pem_example certs/paypal_cert.pem rake init:all db=sqlite
Got to http://localhost:3000
Login as admin using: login: admin pass: adminpass email: email@example.com
Login as user using: login: newton pass: consequunturvoluptatemquae email: firstname.lastname@example.org
The application uses Paypal payment implementing the Ryan's Paypal Tutorial:
So better take a look to these screencasts.
Review the: config/config.yml
Create the certs: certs/app_cert.pem certs/app_key.pem
Download you paypal cert: certs/paypal_cert.pem
View the Ryan's Paypal certs screen cast
Deploy on production
Three differences between development and production:
- Better use mysql instead of sqlite
- Not charge the fake data
- Using real certs
Step by Step on production
git clone git://github.com/bragi/euruko_app.git cd euruko_app
The Bundler Gem
cd euruko_app gem install bundler # or sudo gem install bundler gem bundle
rake init:config_files db=mysql user=euruko password=euruko
- site_domain Your production domain, used on static urls like email urls. ej: euruko2010.org
- site_name ej: EuRuKo2010
- email_sender ej: EuRuKo email@example.com
- email_notification_recipients Array with the emails to receive app notifications. ej: [f.@gmail.com,firstname.lastname@example.org]
- paypal_url normally: https://www.paypal.com/cgi-bin/webscr
- paypal_seller paypal username. ej: email@example.com
- paypal_cert_id paypal cert id. ej: Z954BH8ATL6XC
- paypal_secret paypal communication secret word, used like seed, any value is ok. ej: my_paypal_secret
- yahoo_id the yahoo id. Used on the user profile form for city autocompletion. Look on: https://developer.apps.yahoo.com/wsregapp/
- twitter_user Used on a script that twitts how many tickets are left. The script is turned off.
- twitter_pass Used on a script that twitts how many tickets are left. The script is turned off.
- twitter_notification_step Used on a script that twitts how many tickets are left. The script is turned off.
- tax_percent This is the TAX of the tickets. Used on the invoice creating. ej: 16
- seller_invoice_info Used on the invoice creation, is the Seller invoice info.
- invoices_pdf_path Relative path to the root directory where the invoices PDFs will be stored. ej: /public/invoices
- invoices_serial_prefix Serial prefix for the invoices numbers. ej: euruko-2010-
mysql -uroot mysql> create database euruko_development; mysql> grant all privileges on euruko_development.* to euruko@localhost identified by 'euruko'; mysql> create database euruko_test; mysql> grant all privileges on euruko_test.* to euruko@localhost identified by 'euruko'; mysql> create database euruko; mysql> grant all privileges on euruko.* to euruko@localhost identified by 'euruko'; mysql> exit; rake db:migrate RAILS_ENV=production rake db:migrate RAILS_ENV=development rake db:migrate RAILS_ENV=test
View the Ryan's Paypal certs screen cast
Create the local certs and upload the public key to Paypal.
Download your Paypal user's certificate.
All the certs are on the /certs folder.
Create Admin account
rake populate:admin RAILS_ENV=production
Start to fill the application
Always logged as admin.
As Admin you have a special menu on your right.
The application support multi events. So you can sell tickets for more than one event on the Conference. Like the Conference and a workshop, or a dinner, or whatever.
Got to Events menu > Create New Event
Fill the form, remember that the price should be on cents, so 50 euros will be 5000 cents.
If there are multiple scenarios you can create them and associate each Talk to its Room.
Always have to be at least one Room.
The talks could be created by an Admin but the app is prepared to allow the users to send their own proposes of talks.
The users should go to the registration form, register him self and use the Submit Talk to offer his proposal of talk.
You as Admin can see all the Talks even if they are not on 'Accepted' status. The normal users only could see the Talks on 'Accepted' status.
It is very recommended to ask to the users to propose their own Talks because they can submit their own description, picture and resources.
As the Talk is submitted the user in session will be the principal speaker of the Talk.
Any speaker of the Talk or an Admin could add speakers or delete using the Edit form.
Only the users with 'Public profile' will appear here so if any user want to be a speakers it should have a 'Public profile'.
The Edit form allow to submit a picture of the Talk.
The Edit form allow to submit urls or upload files as extra resources for the talk.
Any Admin could change the status of the Talk, only the Talks on 'Accepted' status will appear on the Calendar view.
The talk could be a session, or a workshop, etc.
There is an special family: 'break' it is like a hack so in the Calendar view the breaks will appear too.
Is important all the 'Accepted' Talks to have a Date and Time or the Calendar View will break down.. (it is a thing to fix).
If in the edit form you don't offer a Time the Date will be not stored.. (another thing to fix).
The Talk have to be associated a Room or the Calendar view will break down. (another thing to fix).
If there is not any Talk accepted the Calendar will show 'Comming soon...'
The Calendar will show all the Talks on 'Accepted' status.
It is important all the Talks on 'Accepted' status to have:
All the users registered on the application.
Only the users that have mark on his profile the 'Public profile' check will be appear here. If an Admin is logged he will see all the Users inclusive the not 'Public profiles'.
All the Users registered
This is a hack.. all the Users that have paid the Event with id == 1 will appear on this list.
As usual only the 'Public profile' will be shown for the users not Admin.
See the '/app/views/users/index.html.erb' to see this menu and adapt it to your needs.
All the users associated to a Talk on 'Accepted' status will appear in this list.
If an Admin is logged he will see all the users associated to a Talk even the Talk is no on 'Accepted' status.
All the lists could be exported to:
Look the links at the end of the lists.
This is important to be checked very carefully.
The best way to check this is one time you have the app on production you can create an Event with a cost of 1 euro (100 cents), for example, and try to pay for it.
You always can go to the seller paypal account and refund this payment.
On the menu 'Payments' you can see all the carts (like the cart on any kind of online store) but all the carts on status 'On session' don't mean anything it is just for debugging.
The important status are:
What means the payment has been accepted.
Not Notified by PayPal
Very strange status that means the user have gone to paypal but paypal has not notified us.
Very important to check what have happened in here.
Paypal allows to refund any payment.
The application is not prepared to support refunds so the refunds you have to do it by hand through Paypal website.
The process of refunds is a little annoying.
You have to go to Paypal to make the refund.
You have to modify the status of the Cart instance you are refunding to change its status.
You will see a 'Paypal Error' on this Cart because the Paypal will notify to our app of the refund but our application won't accept that signal.
You can create static pages as:
- How to arrive
- Payments instructions
Use your admin menu to access to the Pages.
The Description on the edit form admit MarkDown format.
The links to this pages will appear on the menu.
The invoices will be created on demand.
The users could access to his profile and see all the purchases he has done. He can access to the detail of these purchases and create or download the invoice.
You have to configure the seller invoice info on the config/config.yml:
seller_invoice_info: "Spanish Ruby Users Group \nTravessera de les Corts 48, Sobreático 2a \n08903 L'Hospitalet de Llobregat \nBarcelona (Spain) \nG65037772"
You have to configure the TAX of the invoice on the config/config.yml:
The place where the PDFs will be stored:
And the serial prefix for the invoices numeration:
Using this serial prefix the invoices will be numbered like this:
See the /lib/tasks there are a few utile tasks for development.
The email sending is configured to use :sendmail is better to configure to use :smtp but this is not implemented.