Skip to content

Instantly share code, notes, and snippets.

@rxtphan
Last active August 29, 2015 14:14
Show Gist options
  • Save rxtphan/ecf609fad66818eb27f4 to your computer and use it in GitHub Desktop.
Save rxtphan/ecf609fad66818eb27f4 to your computer and use it in GitHub Desktop.
How to get into revenue flows on local
Client upsells
==============
- this doesn't seem to work with @change.org accounts, so user a non-change user
- delete the browser cookie: prompted_petition
- in the change_production repo, open the rails console with: `bundle exec rails c`
- create a petition that has 100+ signatures: `FactoryGirl.create(:lead_in_petition)`
- get the id of the last petition: `Petition.last.id`
- navigate to http://local-change.org/p/:id and sign the petition
- you can tell you are in client upsells by the text at the top "You might also like this *suggested* petition
Member donations
================
- delete the browser cookie: sponsorship_form
- check if you have a victory fund set up: VictoryFundSetting.find_by_country_code('US')
- if not, set up victory fund: FactoryGirl.create(:victory_fund_setting, country_code: 'US')
- associate victory fund to a petition: FactoryGirl.create(:victory_fund, petition: Petition.find('makayla-pfeffer-save-the-world-for-the-314th-time'))
- as an admin, nav to http://www.local-change.org:3000/admin/victory_fund_settings and ensure that "Sponsorship Active" checkbox is on
- (to log in as admin go to https://github.com/change/change_production/blob/master/lib/development/populate_lib/populate.rb#L23... and choose a name from that list. login with user:<name>@change.org pass:Letmein123)
- sign the petition
- you should be redirected to a url like - http://www.local-change.org:3000/p/makayla-pfeffer-save-the-world-for-the-314th-time/sponsors/new
Fulfillment
===========
- delete the browser cookie: prompted_petition
- open the rails console with: `bundle exec rails c`
- create a petition that has victory fund: FactoryGirl.create(:victory_fund_credit)
- as admin user, nav to http://www.local-change.org:3000/admin/victory_funds and ensure that "fulfillment enabled?" checkbox is on for the petition you just created
- create a petition: `FactoryGirl.create(:lead_in_petition)`
- sign petition
- you should be taken to a url like http://www.local-change.org:3000/p/dr-nedra-runolfsson-save-the-world-for-the-26th-time/suggested_petitions?first_time_signer=true&revenue_experience=true
- you can tell you are in member upsells by the text at the top "You might also like this *promoted* petition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment