{"id":15562195,"url":"https://github.com/deanpcmad/paypalrb","last_synced_at":"2026-04-02T02:07:07.049Z","repository":{"id":61490611,"uuid":"551890637","full_name":"deanpcmad/paypalrb","owner":"deanpcmad","description":"Ruby library for interacting with the PayPal v2 API","archived":false,"fork":false,"pushed_at":"2023-03-30T10:02:38.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-22T01:43:11.575Z","etag":null,"topics":["hacktoberfest","paypal","ruby","rubygem"],"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/deanpcmad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-10-15T10:22:24.000Z","updated_at":"2023-12-06T12:09:09.000Z","dependencies_parsed_at":"2025-04-11T21:11:44.573Z","dependency_job_id":"d744278c-8b3e-474b-a0c2-5087a54a0837","html_url":"https://github.com/deanpcmad/paypalrb","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/deanpcmad/paypalrb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanpcmad%2Fpaypalrb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanpcmad%2Fpaypalrb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanpcmad%2Fpaypalrb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanpcmad%2Fpaypalrb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deanpcmad","download_url":"https://codeload.github.com/deanpcmad/paypalrb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deanpcmad%2Fpaypalrb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"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":["hacktoberfest","paypal","ruby","rubygem"],"created_at":"2024-10-02T16:12:17.125Z","updated_at":"2026-04-02T02:07:07.032Z","avatar_url":"https://github.com/deanpcmad.png","language":"Ruby","funding_links":["https://developer.paypal.com/docs/api/catalog-products/v1/","https://developer.paypal.com/docs/api/orders/v2/"],"categories":[],"sub_categories":[],"readme":"# PayPalRB\n\n**This library is a work in progress**\n\nPayPalRB is a Ruby library for interacting with the PayPal API.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'paypalrb'\n```\n\n## Usage\n\n### Authentication\n\nPayPal accepts authentication with either an access token or a client_id and client_secret.\n\nThis library has the ability to generate an access token like so:\n\n```ruby\n@authentication = PayPal::Authentication.new(\n  sandbox: true,\n  client_id: \"\",\n  client_secret: \"\"\n)\n\n@authentication.get_token\n# =\u003e  #\u003cPayPal::AccessToken access_token=\"abc123\", expires_in=123 \n```\n\nThen once you have an access token, set it like so:\n\n```ruby\n@client = PayPal::Client.new(sandbox: true, access_token: \"abc123\")\n```\n\n### Products\n\n```ruby\n# Retrieve a list of products\n@client.products.list\n\n# Retrieve a product by its ID\n@client.products.retrieve id: \"123\"\n\n# Create a product\n# Type should be physical, digital or service\n# Docs: https://developer.paypal.com/docs/api/catalog-products/v1/#products_create\n@client.products.create name: \"My Product\", type: \"\"\n```\n\n### Orders\n\n```ruby\n# Retrieves an Order\n@client.orders.retrieve id: \"abc123\"\n\n# Creates an Order\n# Intent should be either capture or authorize\n# Items is an array of purchase units\n# Docs: https://developer.paypal.com/docs/api/orders/v2/#orders_create\n@client.orders.create intent: \"capture\", items: []\n\n# As above but creates an order for the total of value given\n@client.orders.create_payment intent: \"capture\", description: \"A Payment\",\n  currency: \"GBP\", value: \"25.00\"\n\n# As above but creates an order for a single item\n@client.orders.create_single intent: \"capture\", title: \"Item Title\",\n  description: \"Item Description\", currency: \"GBP\", value: \"25.00\"\n\n# Authorizes payment for an order. The buyer must first approve the order.\n@client.orders.authorize id: \"123abc\"\n\n# Captures payment for an order. The buyer must first approve the order.\n@client.orders.capture id: \"123abc\"\n\n# Confirms a payment source for an order\n@client.orders.confirm id: \"123abc\", source: {}\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/deanpcmad/paypalrb.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanpcmad%2Fpaypalrb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeanpcmad%2Fpaypalrb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeanpcmad%2Fpaypalrb/lists"}