Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 390
- Log:
Initial import of Canvass, a donations-based poll application.
- Author:
- rool
- Date:
- Mon Mar 21 14:58:04 +0000 2011
- Size:
- 997 Bytes
1 | ######################################################################## |
2 | # File:: 51_load_payment_settings.rb |
3 | # (C):: Hipposoft 2011 |
4 | # |
5 | # Purpose:: Load the payment settings from "config/payment_gateway.yml" |
6 | # and define various constants on the basis of its contents. |
7 | # ---------------------------------------------------------------------- |
8 | # 06-Mar-2011 (ADH): Imported from Artisan. |
9 | ######################################################################## |
10 | |
11 | settings = YAML::load_file( File.join( RAILS_ROOT, 'config', 'payment_gateway.yml' ) ) |
12 | settings = settings[ RAILS_ENV ] |
13 | |
14 | # Support 'real' ActiveMerchant gateway classes as well as any we might have |
15 | # defined within Artisan. |
16 | |
17 | begin |
18 | PAYMENT_CLASS = "ActiveMerchant::Billing::#{ settings[ 'gateway' ] }".constantize |
19 | rescue |
20 | PAYMENT_CLASS = settings[ 'gateway' ].constantize |
21 | end |
22 | |
23 | PAYMENT_LOGIN = settings[ 'login' ] |
24 | PAYMENT_PASSWORD = settings[ 'password' ] |
25 | PAYMENT_SIGNATURE = settings[ 'signature' ] |