【发布时间】:2011-08-02 20:24:17
【问题描述】:
我正在使用 rails 制作 paypal 应用程序。 我已经在http://develpers.paypal.com 中创建了所有必要的空调,并且还在我的 Rails 应用程序中插入了所有这些信息。 我的问题是当我试图授权我的卖家空调时,它给了我类似的错误 “失败:由于商家配置无效,无法处理此交易。”
我的代码是:
# 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)
【问题讨论】:
标签: ruby-on-rails paypal