【发布时间】:2013-12-03 10:47:19
【问题描述】:
我有一个支付表单的 Rails 应用程序。正如the official website 所示,我创建了一张这样的新信用卡:
attributes = params[:credit_card]
credit_card = ActiveMerchant::Billing::CreditCard.new(
:number => attributes[:number],
:month => attributes[:month],
:year => attributes[:year],
:first_name => attributes[:first_name],
:last_name => attributes[:last_name],
:verification_value => attributes[:verification_value]
)
它可以工作,但不是很安全,因为它在提交表单后在发布请求中以明文形式传递数据。
保护我的应用程序的最佳方法是什么?我看过this railscast,但它不太适用于activemerchant。
我可以使用 ssl,但这是否足够?我正在使用heroku,所以要拥有ssl,我必须简单地使用https而不是http。
【问题讨论】:
标签: ruby-on-rails ssl heroku paypal activemerchant