Search code examples
ruby-on-railsruby-on-rails-3paypalpaypal-sandboxactivemerchant

checkout with paypal without login


I am trying to implement paypal express checkout using rails. I have read at lot of places that if one wants to do the checkout without paypal account by credit or debit card one can simply use SOLUTIONTYPE=Sole. It does not seem to work though and asks for login when I try to checkout. Please find the attached screenshot which shows this problem.enter image description here

Here is my controller code :-

def pay
        topup = Topup.find(params[:id])

        response = EXPRESS_GATEWAY.setup_purchase(topup.price_in_cents,{
          :ip                => request.remote_ip,
          :currency_code     => 'GBP',
          :return_url        => topups_success_url,
          :cancel_return_url => topups_cancel_url,
          :SOLUTIONTYPE => 'Sole',
          :items => [{:name => "Topup", :quantity => 1,:description => "Top up my account", :amount => topup.price_in_cents}]
        })
        redirect_to EXPRESS_GATEWAY.redirect_url_for(response.token)

    end

what is it that I am doing wrong? I am testing it on sandbox as of now.


Solution

  • Found an answer to this issue on SO itself, here is the link in case someone bumps into this question. API differences between Paypal Express Checkout and Website Payment Standard