Reputation: 1861
Suggest I have User model(devise), this user must be able to pay for some services, using his paypal account. So I want to implement paypal_account:
class PaypalAccount < ActiveRecord::base
attr_accessible #paypal credentials
...
belongs_to :user
end
So when user checkout some service, he is redirected to paypal only to confirm this.
If this is posible: what attributes(fields in db) paypal_accounts
must have?, how to build this request?.
Upvotes: 2
Views: 2489
Reputation: 1776
You can have a look at the APIs Paypal offers to developers, starting from here.
But it can be a long and error-prone task.
IMO the best option is to use the gem who best suits your requirements amongst the several ones you can find on github.
I personally found this quite straightforward to use.
Upvotes: 3
Reputation: 763
This example will be useful for you https://github.com/nov/paypal-express-sample
Upvotes: 8