【问题标题】:How to secure a payment with activemerchant?如何通过 activemerchant 确保付款?
【发布时间】: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


    【解决方案1】:

    让您的付款电话通过 HTTPS 协议是最好的方法。事实上,即使你找到了更好的方法来混淆你正在发送的数据,如果对方不共享相同的逻辑,它也将毫无用处。

    所有像这样的明智和有风险的数据都应该只存在于 HTTPS 协议下。

    【讨论】:

    • this page 他们说所有网站都应该使用ssl。这是最佳做法吗?
    • 总是使用 HTTPS 在整个站点中使用 HTTPS,否则当他们冒充你的会话时你会遇到麻烦。影响将取决于系统架构和用途,但是是的,您应该始终保护您的网站的所有
    猜你喜欢
    • 2021-07-04
    • 2015-02-26
    • 2015-07-20
    • 2016-09-03
    • 2015-06-13
    • 2013-03-17
    • 2016-03-13
    • 2013-02-15
    • 2013-01-24
    相关资源
    最近更新 更多