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
How to Access Nested Elements of a Hash with a Single String Key
Railstutorial - Chapter 8.4.3 - Test Database Not Clearing After Adding User in Integration Test
Render Three Different Partials Depending on Button Clicked
Rails Article Helper - "A" or "An"
What Does "<Top (Required)>" Mean in a Ruby Stack Trace
Is Everything an Object in Ruby
Ruby - Send Get Request with Headers
Error: Failed to Build Gem Native Extension (Ruby Extconf.Rb): MAC Osx
Getting Uninitialized Constant Error When Trying to Run Tests
What Does "Shadowing" Mean in Ruby
How to Solve Insecure World Writable Dir /Usr in Path,Mode 040777 Warning on Ruby
Rails - Local Variables Versus Instance Variables
How to Generate Links with Trailing Slash in Rails 3