wvanbergen/adyen — pull request #48 by rngtng (2012-04-27 12:52:38+00:00)
Title: Support for :billing_address and :customfields

This PR adds support for billing_address and customfields to the Form Helper. Basically this allows you to sth like this:

```ruby
Adyen::Form.hidden_fields({
:currency_code => 'GBP', :payment_amount => 10000,
:ship_before_date => '2007-10-20', :merchant_reference => 'Internet Order 12345',
:skin => :testing, :session_validity => '2007-10-11T11:00:00Z',

:billing_address => {
:street => 'Alexanderplatz',
:house_number_or_name => '0815',
:city => 'Berlin',
:postal_code => '10119',
:state_or_province => 'Berlin',
:country => 'Germany',
},

:customfields => {
:user_details => {
:ninja_color => 'blue'
}
}
})

```

This is archived by:
* new method `adyenize` (pls come up with better name!!) which flattens params, prefix & camelize keys
* new methods `calculate_billing_address_signature` and `calculate_billing_address_signature_string` to auto add billing adress singnature if data is provided. For now here's some little code duplication, the signature process could by dried up. Lemme know if you'd like so..

Happy merging!