Ruby on rails 使用ActiveMerchant在Paypal setExpressCheckout中预先填写姓名
我正在尝试让Paypal SetExpressCheckout操作为账单添加名字和姓氏。我用的是ActiveMerchant。我看到的地址字段是预先填充的街道、州、城市、邮政编码,但没有其他内容Ruby on rails 使用ActiveMerchant在Paypal setExpressCheckout中预先填写姓名,ruby-on-rails,paypal,activemerchant,Ruby On Rails,Paypal,Activemerchant,我正在尝试让Paypal SetExpressCheckout操作为账单添加名字和姓氏。我用的是ActiveMerchant。我看到的地址字段是预先填充的街道、州、城市、邮政编码,但没有其他内容 #### gateway ###### gateway = ActiveMerchant::Billing::PaypalExpressGateway.new(:login => 'login',:password => 'pass',:signature => 'sig')
#### gateway ######
gateway = ActiveMerchant::Billing::PaypalExpressGateway.new(:login => 'login',:password => 'pass',:signature => 'sig')
### options ######
@options = Hash.new
@options.merge!(:ip => '127.0.0.1')
@options.merge!(:return_url => '127.0.0.1')
@options.merge!(:return_url => 'http://www.google.com')
@options.merge!(:cancel_return_url => 'http://www.google.com')
@options.merge!(:name => 'name')
@options.merge!(:description => 'description')
@options.merge!(:max_amount => 5000)
@options.merge!(:solution_type => 'Sole')
@options.merge!(:no_shipping => 1)
@options.merge!(:address_override => 1)
### build address
@address = Hash.new
@address.merge!(:name => "Joe User")
@address.merge!(:address1 => "111 ABCD EFG")
@address.merge!(:address2 => nil)
@address.merge!(:city => "Fremont")
@address.merge!(:state => "CA")
@address.merge!(:country => "US")
@address.merge!(:phone => "408-111-2222")
@options.merge!(:address => @address)
setup_response = gateway.setup_purchase(5000, @options)
redirect_to gateway.redirect_url_for(setup_response.token)
在结果页面上,我没有看到为账单预先填写的名称。
我做错了什么
谢谢我和你有同样的问题。经过一些研究,我得出结论,这是ActiveMerchant中的一个bug。请看我提交的问题。其中包括我如何修补代码以使电话号码和姓名正常工作的说明:
我和你有同样的问题。经过一些研究,我得出结论,这是ActiveMerchant中的一个bug。请看我提交的问题。其中包括我如何修补代码以使电话号码和姓名正常工作的说明: