Standard PayPal integration with Rails. Active Store:
step 1:
-> add 'gem activemerchant' to the gem file
-> install package
step 2:
-> Go to the page "www.developer.paypal.com" and create an account (also known as a Merchant Account) with information about the address in the USA.
-> He will create two dummy test accounts for the buyer and seller (alias assistant) in "sandbox.paypal.com".
Example:
Seller Account ---> naveengoud-facilitator@gmail.com
Buyer Account ---> naveengoud-buyer@gmail.com
-> To view information about test accounts Click "Dashboard β Accounts"
-> Now set a password for both accounts by clicking on the profile link
Step 3:
-> Go to the sellerβs profile page (for example, a facilitator) and copy the API credentials ie, username, password and signature
Example:
Username: naveengoud-facilitator_api1.gamil.com
Password: VSPALJ5ALA5YY9YJ
Signature: AVLslxW5UGzEpaDPEK4Oril7Xo4IAYjdWHD25HhS8a8kqPYO4FjFhd6A
-> Set these API credentials in "config / environment / development.rb" as follows: add the code below with the API credentials
config.after_initialize do ActiveMerchant::Billing::Base.mode = :test ::GATEWAY = ActiveMerchant::Billing::PaypalGateway.new( login: "merchant_api1.gotealeaf.com", password: "2PWPEUKZXAYE7ZHR", signature: "AFcWxV21C7fd0v3bYYYRCpSSRl31A-dRI5VpyF4A9emruhNYzlM8poc0" ) end
step 4:
-> Next, follow the episode of Rails cast 145 ( http://railscasts.com/episodes/145-integrating-active-merchant )
source share