带有 rails 的 Paypal 中无效的商家配置 [英] An invalid merchant configuration in Paypal with rails
问题描述
我正在使用 rails 制作贝宝应用程序.我已经在 http://develpers.paypal.com 中创建了所有必要的 a/c 并且还插入了所有这些我的 rails 应用程序中的信息.我的问题是当我试图授权我的卖家 a/c 时,它给了我这样的错误失败:由于商家配置无效,无法处理此交易."
I am making the paypal application with rails. I have create all the necessary a/c in http://develpers.paypal.com and also have insert all that information in my rails app. My problem is when i am trying to authorize my seller a/c, it gives me error like "Failure: This transaction cannot be processed due to an invalid merchant configuration."
我的代码是:
# 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)
推荐答案
得到了解决方案.我用谷歌搜索过,但得到了有关计费协议"的信息.但该功能在网站支付专业版中提供.所以我刚刚使用 WPP 创建了一个测试帐户并使用该 WPP 帐户凭据进行交易.它工作正常.
Got the solution. I have google it but got the information about the "Billing agreement". But that functionality is provided in Website Payment Pro. so I have just create an test account using WPP and use that WPP account credential for transaction. It works fine.
干杯!!!
这篇关于带有 rails 的 Paypal 中无效的商家配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!