Skip to content

Instantly share code, notes, and snippets.

@WanderGink
Last active May 15, 2017 14:19
Show Gist options
  • Save WanderGink/c30b615b234647b7d5c37f7b34f00278 to your computer and use it in GitHub Desktop.
Save WanderGink/c30b615b234647b7d5c37f7b34f00278 to your computer and use it in GitHub Desktop.

Revisions

  1. WanderGink revised this gist May 15, 2017. 1 changed file with 15 additions and 15 deletions.
    30 changes: 15 additions & 15 deletions using_paypal_gem.md
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,19 @@
    -> Add 'gem activemerchant' in gem file
    -> bundle install
    -> Go to "developer.paypal.com" and create an account(also known as Merchant Account) with US address details.
    -> It will create two dummy test account for buyer and seller(alias facilitator) in "sandbox.paypal.com".
    Ex:
        Seller account  --->  [email protected]
    Buyer account  --->  [email protected]
    To see test accounts details Click on "Dashboard -> Accounts"
    Now set the password for both test accounts by clicking on profile link
    -> Add 'gem activemerchant' in gem file
    -> bundle install
    -> Go to "developer.paypal.com" and create an account(also known as Merchant Account) with US address details.
    -> It will create two dummy test account for buyer and seller(alias facilitator) in "sandbox.paypal.com".
    Ex:
        Seller account  --->  [email protected]
      Buyer account  --->  [email protected]
    To see test accounts details Click on "Dashboard -> Accounts"
    Now set the password for both test accounts by clicking on profile link

    Go to seller account(i.e, facilitator) profile details and copy the API Credentials i.e, Username, password and signature
    Ex:
        Username:  naveengoud-facilitator_api1.gamil.com
        Password:   VSPALJ5ALA5YY9YJ
        Signature:   AVLslxW5UGzEpaDPEK4Oril7Xo4IAYjdWHD25HhS8a8kqPYO4FjFhd6A
    Set these API Credentials in "config/environments/development.rb" as follows, add the below code with API credentials
    Go to seller account(i.e, facilitator) profile details and copy the API Credentials i.e, Username, password and signature
    Ex:
        Username:  naveengoud-facilitator_api1.gamil.com  
        Password:   VSPALJ5ALA5YY9YJ
        Signature:   AVLslxW5UGzEpaDPEK4Oril7Xo4IAYjdWHD25HhS8a8kqPYO4FjFhd6A  
    Set these API Credentials in "config/environments/development.rb" as follows, add the below code with API credentials
    ```ruby
      config.after_initialize do
    ActiveMerchant::Billing::Base.mode = :test    
  2. WanderGink created this gist May 15, 2017.
    26 changes: 26 additions & 0 deletions using_paypal_gem.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    -> Add 'gem activemerchant' in gem file
    -> bundle install
    -> Go to "developer.paypal.com" and create an account(also known as Merchant Account) with US address details.
    -> It will create two dummy test account for buyer and seller(alias facilitator) in "sandbox.paypal.com".
    Ex: 
        Seller account  --->  [email protected]
    Buyer account  --->  [email protected]
    To see test accounts details Click on "Dashboard -> Accounts"
    Now set the password for both test accounts by clicking on profile link

    Go to seller account(i.e, facilitator) profile details and copy the API Credentials i.e, Username, password and signature
    Ex:
        Username:  naveengoud-facilitator_api1.gamil.com
        Password:   VSPALJ5ALA5YY9YJ
        Signature:   AVLslxW5UGzEpaDPEK4Oril7Xo4IAYjdWHD25HhS8a8kqPYO4FjFhd6A
    Set these API Credentials in "config/environments/development.rb" as follows, add the below code with API credentials
    ```ruby
      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
    ```
    From here onward follow the Rails cast 145 episode (http://railscasts.com/episodes/145-integrating-active-merchant)