次のコード
purchase = @order.authorize_payment(@credit_card, オプション) is_success = purchase.success? if is_success ... そうしないと flash[:notice] = "!! " + purchase.message + "
" + purchase.params['missingField'].to_s redirect_to :action => :payment, :id => @order.id 終わり
flash[:notice] で "!! Failed with 500 Internal Server Error" という結果になります。スタック トレースも Web サーバー エラーもありません。は偽です。
これをトラブルシューティングする方法を理解するのに本当に途方に暮れています。SSL 要件である可能性があると思いますが、SOAP リクエストが表示されないか、サイバーソース (私の支払いゲートウェイ) との基本的な接続をテストできません。
このコードでゲートウェイを確立します (config.after_initialize の後):
ActiveMerchant::Billing::Base.mode = :production # :test ActiveMerchant::Billing::CreditCard.require_verification_value = false ActiveMerchant::Billing::CyberSourceGateway.wiredump_device = File.new(File.join([Rails.root, "log", "cybersource.log"]), "a") # 動作しません (!) # パスワードを取得するために外部ファイルを開く必要があります mypassphrase = File.open('/var/www/foo/shared/passphrase.txt').read OrderTransaction.gateway = ActiveMerchant::Billing::CyberSourceGateway.new(:login => 'vxxxxxxx', :password => mypassphrase.to_s, :test => false, :vat_reg_number => 'VAT登録番号', # 税務目的で実際に存在する州/県を設定します :nexus => "がああ", # AVS を使いたくないので、AVS が失敗しても処理を続行します :ignore_avs => true, # CVV を使用したくないので、CVV が失敗しても処理を続行します :ignore_cvv => true, :money_format => :ドル )
石鹸のリクエストを見ることはできますか?この部分をテストする方法はありますか? どんな助けでも大歓迎です。
一番、
ティム