{"id":18728689,"url":"https://github.com/rubyonworld/paypal","last_synced_at":"2025-10-07T02:23:49.879Z","repository":{"id":174008034,"uuid":"542159109","full_name":"RubyOnWorld/paypal","owner":"RubyOnWorld","description":"A simple ruby wrapper for paypal.","archived":false,"fork":false,"pushed_at":"2022-09-27T23:42:16.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T20:32:32.931Z","etag":null,"topics":["paypal","ruby","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubyOnWorld.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-27T15:31:28.000Z","updated_at":"2022-09-28T01:26:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"91277cc5-ab30-43ef-b773-e46946e7a2c5","html_url":"https://github.com/RubyOnWorld/paypal","commit_stats":null,"previous_names":["rubyonworld/paypal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RubyOnWorld/paypal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpaypal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpaypal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpaypal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpaypal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/paypal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fpaypal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708213,"owners_count":26031970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["paypal","ruby","wrapper"],"created_at":"2024-11-07T14:23:47.457Z","updated_at":"2025-10-07T02:23:49.875Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# paypal\nA simple ruby wrapper for paypal.\n\n## Features\nCurrently paypal supports the following:\n\n* Verifying Paypal IPN's\n* MassPay Requests\n* Permissions Service\n* Authentication Service\n\n## Configuration\n    Paypal.setup do |config|\n      config.environment = \"sandbox\" # replace with \"live\" in production\n      config.api_username = \"Replace me with your api username\"\n      config.api_password = \"Replace me with your api password\"\n      config.api_signature = \"Replace me with your api signature\"\n    end\n\n## Usage\n### IPN Modules\n#### Paypal::Ipn\n    class PaypalIpn\n      include Paypal::Ipn\n      attr_accessor :params\n    end\nNote: Your class must respond to `params` and return a hash of paypal ipn parameters\n\n##### Public methods\n* `payment_completed?`\n* `payment_status`\n* `txn_id`\n\n##### Private methods\n* `verify` Verifies the IPN with paypal and returns true or false\n* `receiver_email`\n* `self.txn_type(params)`\n* `self.masspay_transaction?(params)`\n\n#### Paypal::Ipn::Buyer\n    class BuyerPaypalIpn\n      include Paypal::Ipn::Buyer\n      attr_accessor :params\n    end\n\n##### Public methods\n* `customer_address` Convienence method. e.g.\nJohn Smith,\n5 Some Street,\nSome City,\nSome State,\nAustralia 1234\n* `customer_address_name`\n* `customer_address_street`\n* `customer_address_city`\n* `customer_address_state`\n* `customer_address_zip`\n* `customer_address_country`\n\n#### Paypal::Ipn::Item\n    class ItemPaypalIpn\n      include Paypal::Ipn::Item\n      attr_accessor :params\n    end\n\n##### Public methods\n* `item_name(index = nil)` If index is supplied it will return item_name#index otherwise simply item_name\n* `item_number(index = nil)`\n* `item_quantity(index = nil)`\n* `number_of_cart_items`\n\n#### Paypal::Ipn::Masspay\n    class MasspayPaypalIpn\n      include Paypal::Ipn::Masspay\n      attr_accessor :params\n    end\nNote: Currently Masspay IPN's only support a single transaction\n\n##### Public methods\n* `payment_status` Returns the payment status for the 1st transaction\n* `txn_id` Returns the transaction id for the 1st transaction\n* `payment_unclaimed?` Returns whether the payment status for the 1st transaction was unclaimed or not\n\n##### Private methods\n* `unique_id` Returns the unique_id for the 1st transaction\n\n### Masspay\n    class Masspay\n      include Paypal::Masspay\n      attr_accessor :payment_response\n    end\nNote: Your class must respond to `payment_response` and return the payment response as a hash\n\n##### Public methods\n* `successful_payment?` Returns whether the masspay request was successful or not. Note: This only tells you if the request was successful or not. You should wait for an IPN to verify the receiver has been paid.\n\n##### Private methods\n* `masspay(payer_email, receiver_email, amount, currency, note, unique_id)` Sends a mass pay request from *payer_email* to *receiver_email* for *amount* in *currency*. The *note* will appear on the receivers paypal account and the *unique_id* will be passed back in the Paypal IPN. Returns the response from paypal.\n\n* `payment_error_type` Returns *:unauthorized* or *:insufficient_funds* for these types of errors otherwise returns *:unknown*\n\n* `payment_error_message` Returns the paypal long error message\n\nNote: Currently Masspay payments only support a single recipient\n\n### Permissions Service\n    class Permissions\n      include Paypal::Permissions\n    end\n\n#### Usage\n1. Make a call to `set_paypal_permissions_url` setting the *return_url* to your application's callback url and with your *required_permissions*\n\n2. Redirect the user to that url\n\n3. When Paypal redirects the user back to your application at *return_url* make a call to `get_paypal_permissions` with the token parameter\n\nSee below for further details:\n\n##### Private methods\n`set_paypal_permissions_url(return_url, required_permissions = {})`\nReturns a url where the user can sign in to Paypal and authorize the requested permissions. Paypal will then redirect the user to the *return_url*. Specify *required_permissions* by supplying a hash in the following format:\n    {\n      :mass_pay =\u003e true,\n      :refund_transaction =\u003e true,\n      :get_transaction_details =\u003e true\n    }\nFirst name, Last name and email are always required permissions so you never have to specify these manually.\n\n`get_paypal_permissions(token)`\nReturns a hash of user information and permission details for the given *token* in the following format:\n    {\n      :email =\u003e \"joe@example.com\",\n      :first_name =\u003e \"Joe\",\n      :last_name =\u003e \"Bloggs\",\n      :payer_id =\u003e \"VK7XZU4BDY79\",\n      :permissions =\u003e {\n        :mass_pay =\u003e true,\n        :refund_transaction =\u003e true,\n        :get_transaction_details =\u003e true\n      }\n    }\n\n## Installation\n\n    gem install paypal-ipn\n\n## Rails\n\nPlace the following in your Gemfile:\n    `gem 'paypal-ipn', :require =\u003e 'paypal'`\n\nTo generate a stub initializer under config/initializers run:\n    `rails g paypal:initializer`\n\n\nCopyright (c) 2010 David Wilkie, released under the MIT license\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fpaypal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fpaypal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fpaypal/lists"}