简体   繁体   中英

Invalid date notation: nil! Adyen Rails Gem Error

I'm looking to integrate my rails application with the payment provider Adyen, I've installed the Adyen Gem and put the code in to make a basic form, but I'm getting an error:

Adyen Gem: http://github.com/wvanbergen/adyen

Invalid date notation: nil!

/Users/chris/.gem/ruby/1.8/gems/adyen-0.1.5/lib/adyen/formatter.rb:10:in fmt_date' /Users/chris/.gem/ruby/1.8/gems/adyen-0.1.5/lib/adyen/form.rb:35:in do_attribute_transformations!' /Users/chris/.gem/ruby/1.8/gems/adyen-0.1.5/lib/adyen/form.rb:40:in payment_fields' /Users/chris/.gem/ruby/1.8/gems/adyen-0.1.5/lib/adyen/form.rb:59:in hidden_fields' app/views/payments/free.html.erb:7

my Code is:

 <% form_tag(:url => Adyen::Form.url) do %>
<%= Adyen::Form.hidden_fields(:merchant_account => 'myaccount',:skin_code => 'myperfectskin', :shared_secret => 'youllneverguess', :payment_amount => '1000') %>

If you look at the Adyen's source, you'll see on lib/adyen/form.rb at the line 35 that there's a ship_before_date required option which you don't fill.

But you're using Adyen at it's version 0.1.5 when there's the 0.2.1 version (and apparently that "bug" has been corrected).
If you installed that version (with gem install adyen -v=0.2.1 ), you would be using a much more recent and reliable version of the library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM