2011-04-11 33 views
0

我使用rails製作paypal應用程序。 我已經在http://develpers.paypal.com中創建了所有必需的a/c,並且還在我的rails應用程序中插入了所有這些信息。 我的問題是,當我試圖授權我的賣家a/c,它給了我錯誤,如 「失敗:由於商家配置無效,此交易無法處理。」支付寶與軌道中的無效商家配置

我的代碼是:

# all inforation is of seller API id, password, signature 
gateway = ActiveMerchant::Billing::PaypalGateway.new(
     :login => "seller_1302505219_biz_api1.gmail.com", 
     :password => "...", 
     :signature => "..." 
    ) 

options = { 
    :ip => request.remote_ip, 
    :billing_address => { 
    :name  => "Name", 
    :address1 => '1 Main St', 
    :address2 => '', 
    :city  => 'San Jose', 
    :state => 'CA', 
    :country => 'US', 
    :zip  => '95131', 
    # :phone => '408-983-5678' 
    :phone => '408-678-0945' 
    } 
} 
res = gateway.authorize(amount, credit_card, options) 

回答

1

得到了解決。 我有谷歌它,但得到了關於「帳單協議」的信息。 但該功能在網站付款專業版中提供。 ,所以我剛剛使用WPP創建了一個測試帳戶,並使用該WPP帳戶憑證進行交易。 它工作正常。

乾杯!

0

此外,即使在沙盒中註冊帳戶,您的帳戶可能也可能不會啓用Pro(DoDirectPayment)。在x.com論壇上有一個主題,您可以請求其中一位支持人員爲您啓用它。

+0

是的。謝謝哥們。還有一個,你可以發送電子郵件到「[email protected]」 – 2011-04-16 15:15:19

2

您需要在Website Payments Pro中設置賣家帳戶。

  1. 使用預先配置的選項創建您的銷售測試帳戶。
  2. 帳戶類型,請選擇網站付款Pro

祝你好運!

+0

感謝您的回答,但我已經找到它,也回答了它。 – 2011-12-30 04:15:57

+0

我遇到了同樣的問題,並發現這是最簡單的解決方案。我將它發佈給有相同問題的其他人並找到這篇文章。 – nslocum 2012-01-01 18:34:31

+0

謝謝nslocum ... – 2012-01-19 10:59:50

相關問題