Search code examples
ruby-on-railsrubybraintree

Braintree for rails


I want to show the price of a plan I created in Braintree. I'm trying to retrieve the details via the the Braintree api by using this: Braintree::Plan.price

<%= form_tag transactions_path do%>
  <div id="dropin"></div>
  <%=submit_tag "Pay #{Braintree::Plan.price}$", class: "button mt1" %>

But I'm getting this error: undefined method price' for Braintree::Plan:Class

Does someone know how to implement this?


Solution

  • I got it... just had to put params["price"] into the submit tag!!

    <%=submit_tag "Pay #{params["price"]}$", class: "button mt1" %>