私はactivemerchant 1.16.0とrails 3.0.5を持っています。
アクティブなマーチャントを使用して PayPal のゲートウェイと通信するための基本的なコードを作成しようとしています。
if credit_card.valid?
# or gateway.purchase to do both authorize and capture
response = gateway.authorize(1000, credit_card, :ip => "127.0.0.1")
if response.success?
gateway.capture(1000, response.authorization)
puts "Purchase complete!"
else
puts "Error: #{response.message}"
end
else
puts "Error: credit card is not valid. #{credit_card.errors.full_messages.join('. ')}"
end
次のエラーが表示されます。
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.9/lib/active_support/xml_mini/rexml.rb:20:in `parse': uninitialized constant ActiveSupport::XmlMini_REXML::StringIO (NameError)
このエラーはgateway.authorize()
呼び出しから伝播します。私のセットアップの何が問題なのですか?ありがとう。