تدوين تاريخ غير صالح: لا شيء! خطأ في جيم ريلز جيمز
-
06-07-2019 - |
سؤال
أتطلع إلى دمج تطبيق Rails الخاص بي مع مزود الدفع Adyen ، لقد قمت بتثبيت GEM Adyen ووضع الكود في وضع نموذج أساسي ، لكنني أتلقى خطأ:
جيم أدين: http://github.com/wvanbergen/adyen
تدوين تاريخ غير صالح: لا شيء!
/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:inpayment_fields' /Users/chris/.gem/ruby/1.8/gems/adyen-0.1.5/lib/adyen/form.rb:59:in
تطبيق/طرق العرض/المشاهدات/المدفوعات/free.html.erb: 7
الكود الخاص بي هو:
<% 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.