0

我在 Rails 应用程序中使用贝宝直接付款。我集成在实时站点中,同时购买显示错误的任何项目,例如,

字段比服务器允许的长或短

require 'rubygems'
            require 'active_merchant'
            ActiveMerchant::Billing::Base.mode = :production
            credit_card = ActiveMerchant::Billing::CreditCard.new(
            :number     => 'xxxxxxxxxxxxxxxxx',
            :month      => '3',
            :year       => '2018',
            :first_name => 'xxxxxx',
            :last_name  => 'xxxxxxx',
            :verification_value  => 'xxxxxx'
            )
            gateway = ActiveMerchant::Billing::PaypalGateway.new(
            :login => "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
            :password => "xxxxxxxxxxxxxxxx",
            :signature => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "
            )   
            response = gateway.authorize(1, credit_card, :ip => '127.1.1.1')

请给出解决方案。

4

1 回答 1

1

您的帐户中显示的唯一错误如下。

errorcode 10501
shortmessage "Invalid Configuration"
longmessage "由于商户配置无效,无法处理此交易。"

当您尝试执行 DoDirectPayment API 请求并且没有在您的帐户上启用 Pro 时,可能会导致这种情况。您的软件可能将该错误转换为您看到的字段错误。如果您希望在您的帐户上启用 Pro 以便能够执行 DoDirectPayment API 调用,请联系客户支持。

于 2013-06-13T14:23:42.310 回答