1

問題のある酒宴プロジェクトを継承しました。チェックアウト時に、ユーザーがクレジット カード情報を提供した後、システムでレール例外が発生します。ログインパラメータが必要になる可能性のあるものについてのガイダンスを探しています。私は酒宴がどのように機能するかをすぐに学んでいるので、どんなガイダンスも役に立ちます。ありがとう!

Started PUT "/checkout/update/payment" for 107.3.138.229 at 2012-09-28 08:52:11 -0700
Processing by Spree::CheckoutController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"XXXXXXX=", "order"=>{"payments_attributes"=>[{"payment_method_id"=>"2"}], "coupon_code"=>""}, "payment_source"=>{"2"=>{"number"=>"[FILTERED]", "month"=>"X", "year"=>"XXXX", "verification_value"=>"XXX", "first_name"=>"XXX", "last_name"=>"XXX"}}, "commit"=>"Save and Continue", "state"=>"payment"}
Completed 500 Internal Server Error in 464ms

ArgumentError (Missing required parameter: login):
  active_utils (1.0.4) lib/active_utils/common/requires_parameters.rb:11:in `block in requires!'
  active_utils (1.0.4) lib/active_utils/common/requires_parameters.rb:4:in `each'
  active_utils (1.0.4) lib/active_utils/common/requires_parameters.rb:4:in `requires!'
  activemerchant (1.20.4) lib/active_merchant/billing/gateways/authorize_net.rb:74:in `initialize'
  spree_core (1.1.3) app/models/spree/gateway.rb:25:in `new'
  spree_core (1.1.3) app/models/spree/gateway.rb:25:in `provider'
  spree_core (1.1.3) lib/spree/core/delegate_belongs_to.rb:82:in `delegator_for'
  spree_core (1.1.3) lib/spree/core/delegate_belongs_to.rb:44:in `block (2 levels) in delegate_belongs_to'
  spree_core (1.1.3) app/models/spree/payment/processing.rb:128:in `block in gateway_action'
  spree_core (1.1.3) app/models/spree/payment/processing.rb:172:in `protect_from_connection_error'
  spree_core (1.1.3) app/models/spree/payment/processing.rb:125:in `gateway_action'
  spree_core (1.1.3) app/models/spree/payment/processing.rb:22:in `authorize!'
  spree_core (1.1.3) app/models/spree/payment/processing.rb:11:in `process!'
  activerecord (3.2.8) lib/active_record/associations/collection_proxy.rb:89:in `each'
  activerecord (3.2.8) lib/active_record/associations/collection_proxy.rb:89:in `method_missing'
  spree_core (1.1.3) app/models/spree/order.rb:380:in `process_payments!'
  spree_core (1.1.3) app/models/spree/order.rb:83:in `block (2 levels) in <class:Order>'
4

2 に答える 2

1

支払い方法としてautorize.netゲートウェイを使用して同じ問題を抱えています。このレール例外が発生したため、ログインとパスワードが表示されなかった前に、authorize.netでテストアカウントを作成し、このアカウントのログインIDとキーを管理者に設定しましたauthorize.net 構成の側と解決された問題。

      Card Not Present Test Account

          API Login ID 3cm2NkD3GyyyW

          Transaction Key 6v7CEMcRq5H74p5yyg   #as password

テスト アカウントの資格情報を提供する前に、PayPal で同じエラーが発生することさえあります

他の人を助けることを願っています

于 2012-11-23T11:52:36.863 に答える
1

あなたの authorize_net モジュールには、必要な構成が提供されていないと思います。および/または構成が環境に提供されていません (ゲートウェイ構成は環境ごとに提供されるため、実稼働データベース構成をロードして開発で実行する場合、必要な構成がない可能性があります)。

全体像を把握するために、authorize_net モジュールはactive_merchant gem (Shopify によるチェックアウト モジュール) の一部であり、spree_gateway で Spree 用に拡張され、active_merchantの構成は Spree によって管理され、データベースに保存されます。

Spree ガイドで提供されている構成例があります。

# gateway/authorize_net.rb
class Gateway::AuthorizeNet < Gateway
    preference :login, :string
    preference :password, :string

    def provider_class
        ActiveMerchant::Billing::AuthorizeNetGateway
    end
end

次に、管理パネルからログイン/パスワードを設定するか、自動的にシードすることができます.

于 2012-10-01T01:06:21.653 に答える