ActiveMerchantのPaypal Expressで金額の欄が空欄になる

http://stackoverflow.com/questions/9260499/paypal-express-active-merchant-not-displaying-line-items-or-cart-total

itemsというオプションを指定しないといけない

@product = Product.find(params[:product_id])

setup_response = gateway.setup_purchase(200,
  :ip                => request.remote_ip,
  :items => [{:name => "Tickets", :quantity => 22, :description => "Tickets for 232323", :amount => 10}],
  :return_url        => url_for(:action => 'confirm', :only_path => false),
  :cancel_return_url => url_for(:action => 'index', :only_path => false)
)

redirect_to gateway.redirect_url_for(setup_response.token)

上の例では額を200と指定していながら、quantity=22、amount=10なので22×10=220となって一致しないのでエラーが出る。