Paypal中带有Rails的无效商家配置 [英] An invalid merchant configuration in Paypal with rails
问题描述
我正在使用rails进行paypal申请. 我已经在 http://develpers.paypal.com 中创建了所有必需的帐户,并插入了所有内容我的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)
推荐答案
找到解决方案. 我已经在google上找到了,但是得到了有关账单协议"的信息. 但是该功能是在Website Payment Pro中提供的. 因此,我刚刚使用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.
干杯!
这篇关于Paypal中带有Rails的无效商家配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!