How to Integrate Paypal with Ruby on Rails

How to integrate Paypal integration in Ruby on Rails

The question on 'better' is very subjective. Some facts: cost to you in time & cost in you per transaction. Depending on the country Stripe & Paypal take different amounts. I believe (in the uk) Stripe is cheaper (https://stripe.com/gb/pricing), 1.4% + 20p compared to paypal which I believe starts at 3.4% + 20p.

However for a developer, the bigger cost is the cost to build & maintain. My subjective experience on this (having implemented both previously) is the stripes documentation is easier and faster to integrate into your app.

Please note: Stripe does not o(as far as I know) support paypal payments. If you need this, you will need to use Paypal or Braintree (a paypal company: https://www.braintreepayments.com). Braintree is an all in one payments processor (similar charges to paypal), however they are currently offering the first £30k free (it may have country restrictions on that offer).

How to implement new version of PayPal payment gateway using REST application?

Use this front-end: https://developer.paypal.com/demo/checkout/#/pattern/server

It will call two routes on your server, which you need to set up and create.

One of those routes will call the PayPal API to 'Set Up Transaction', and the other will 'Capture Transaction'. The guide for that is here: https://developer.paypal.com/docs/checkout/reference/server-integration/

The Ruby SDK to use for those API calls to PayPal is here: https://github.com/paypal/Checkout-Ruby-SDK



Related Topics



Leave a reply



Submit