Hi Could anyone tell me if this is possible even with it being bad practice and not using RoR as it was intended, I am looking into customizing my CRM named 'HostPay' in order to integrate stripe payments. Hostpay doesn't support stripe, but It is written in Ruby and containes a number of rhtml files. I'm looking to create a stand alone html.erb file which receives a variable written as <%= (basket.to_f_withvat).to_money %> from one of the existing files. On my stand alone page the variable mentioned will be assigned as such: basket_total = (basket.to_f_withvat).to_money charge = Stripe::Charge.create( :amount => basket_total, # This is your value as a variable. :currency => "usd", :card => token, ====etc ====== This will then proceed to take card payment with stripe Of course my file will be nothing to do with the existing CRM structure of views, models and Controllers, but as long as it renders in the browser and can recieve the variable then it wont matter for this situation. Again, I know this is bad practice but it's the only way i have at present of doing this. Hope someone can help me with this Thanks LEe
on 2014-03-13 14:49
on 2014-03-13 16:19
On Thursday, March 13, 2014 9:33:58 AM UTC-4, Lee Godden wrote: > > ====etc ====== > LEe > > I'm not sure if I can help, but is HostPay a Ruby on Rails app? If so, it must be an old one. Rails hasn't supported rhtml files since version 2. Stripes is actually pretty straightforward. There's a gem 'stripes' you can use, and they have instructions for using their API in Rails at the following link: stripe.com/docs/checkout/guides/rails
on 2014-03-13 16:58
On Thursday, March 13, 2014 11:18:34 AM UTC-4, mike2r wrote: >> support stripe, but It is written in Ruby and containes a number of rhtml >> charge = Stripe::Charge.create( >> Hope someone can help me with this > following link: > > stripe.com/docs/checkout/guides/rails > sorry, the gem is 'stripe' (singular) not 'stripes'