【问题标题】:ActiveMerchant response with error: "Invalid timestamp: Value exceeds allowable limit"带有错误的 ActiveMerchant 响应:“无效的时间戳:值超出允许的限制”
【发布时间】:2014-01-21 15:18:44
【问题描述】:

我正在尝试使用 ActiveMerchant 文档中的示例进行测试付款,我收到结果=508,消息=无效时间戳:值超出允许限制的响应。

这是我正在使用的代码:

ActiveMerchant::Billing::Base.mode = :test

gateway = ActiveMerchant::Billing::RealexGateway.new(
            :login => 'myUsername',
            :password => 'myPassword')

amount = 1000  # $10.00

credit_card = ActiveMerchant::Billing::CreditCard.new(
                :first_name         => 'Bob',
                :last_name          => 'Bobsen',
                :number             => 'valid card number',
                :month              => '8',
                :year               => '2015',
                :verification_value => '123')

if credit_card.valid?
  response = gateway.purchase(amount, credit_card)
  if response.success?
    puts "Successfully charged $#{sprintf("%.2f", amount / 100)} to the credit card #{credit_card.display_number}"
  else
    raise StandardError, response.message
  end
end

有人遇到过这样的错误吗?

谢谢, 乌里

【问题讨论】:

    标签: ruby-on-rails activemerchant realex-payments-api


    【解决方案1】:

    此错误表示您在请求中发送的时间戳已过期 24 小时以上。你能检查服务器上的时间并确保它是准确的吗?

    这不是一个很好的消息 - 对此表示歉意! 欧文

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多