rony36
rony36

Reputation: 3339

Rails: PayPal Express Checkout Integration in Localhost

I don't know, where to start. I'm integrating PayPal Express Checkout in my RoR application in my Localhost server.

Yes, I'm using a gem, merchant-sdk-ruby.

In this integration, I'm trying to follow this working flow: enter image description here

  1. set_express_checkout
  2. get_express_checkout
  3. do_express_checkout

In set_express_checkout I'm able to generate token successfully and able to redirect to https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token=EC-93W211694E768010D here with my generated token.

Inside the method which generates token, I mean in set_express_checkout, I had to provide 3 URL.

  1. ReturnUrl
  2. NotifyUrl
  3. CancelUrl

Isn't it ReturnUrl (a URL of my application (which in localhost) with token and payerID) in which PayPal redirects after generating Checkout Details?

My Question is: Does PayPal redirects in a specific URL of my Application which is hosted on my Local Server?

Please help to integrate PayPal Express Checkout in my localhost.

Upvotes: 0

Views: 1955

Answers (3)

rony36
rony36

Reputation: 3339

Actually, I got the answer of my question from that discussion.

Pointing my localhost to a public domain name using dynamic dns we can test it. Another solution is to use localtunnel. It's really a cool service.

Upvotes: 0

siddick
siddick

Reputation: 1478

You can configure your local app url( Eg: http://localhost:3000/return ) in ReturnURL field.

Try live sample: https://paypal-sdk-samples.herokuapp.com/merchant/set_express_checkout

Upvotes: 2

Aditya Kapoor
Aditya Kapoor

Reputation: 1570

I would recommend that you first go through the following Railscast episodes first (http://railscasts.com/episodes?search=paypal) to get an idea about the Paypal.

Upvotes: 0

Related Questions