{"id":18928129,"url":"https://github.com/hearthsim/dj-paypal","last_synced_at":"2025-04-07T05:16:41.002Z","repository":{"id":42680908,"uuid":"100705515","full_name":"HearthSim/dj-paypal","owner":"HearthSim","description":"Paypal integration for Django - Inspired by dj-Stripe","archived":false,"fork":false,"pushed_at":"2025-03-10T12:57:40.000Z","size":267,"stargazers_count":88,"open_issues_count":7,"forks_count":20,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-31T04:07:14.861Z","etag":null,"topics":["django","payments","paypal","paypal-rest-sdk","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/HearthSim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"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}},"created_at":"2017-08-18T11:25:15.000Z","updated_at":"2025-03-10T12:55:54.000Z","dependencies_parsed_at":"2024-02-29T17:47:11.343Z","dependency_job_id":null,"html_url":"https://github.com/HearthSim/dj-paypal","commit_stats":null,"previous_names":["dj-stripe/dj-paypal"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HearthSim%2Fdj-paypal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HearthSim%2Fdj-paypal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HearthSim%2Fdj-paypal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HearthSim%2Fdj-paypal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HearthSim","download_url":"https://codeload.github.com/HearthSim/dj-paypal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"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","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":["django","payments","paypal","paypal-rest-sdk","python"],"created_at":"2024-11-08T11:23:02.905Z","updated_at":"2025-04-07T05:16:40.973Z","avatar_url":"https://github.com/HearthSim.png","language":"Python","funding_links":["https://developer.paypal.com"],"categories":[],"sub_categories":[],"readme":"# dj-paypal\n\n[![CI](https://github.com/HearthSim/dj-paypal/actions/workflows/ci.yml/badge.svg)](https://github.com/HearthSim/dj-paypal/actions/workflows/ci.yml)\n[![PyPI](https://img.shields.io/pypi/v/dj-paypal.svg)](https://pypi.org/project/dj-paypal/)\n\n\nA Paypal integration for Django, inspired by [dj-stripe](https://github.com/dj-stripe/dj-stripe).\n\nCurrently only supports subscriptions.\n\n\n## Requirements\n\n- Python 3.6+\n- Django 3.1+\n- Postgres 9.6+ (Non-postgres engines not supported)\n\n\n## Installation\n\n1. Install dj-paypal with `pip install dj-paypal`\n2. Add `djpaypal` to django `INSTALLED_APPS` setting\n3. Get a client ID and client secret from paypal and add them to the settings\n   `PAYPAL_CLIENT_ID` and `PAYPAL_CLIENT_SECRET`\n4. Set `PAYPAL_MODE = \"sandbox\"` (or `\"live\"`) in the settings\n5. Install your Billing Plans (see below)\n\n\n### Setting up billing plans\n\n#### Download already-created billing plans from Paypal\n\nRun `manage.py djpaypal_download_plans` to sync all plans already created upstream\ninto the local database.\n\nThis will create `djpaypal.models.BillingPlan` objects, which can be listed from\nthe Django admin.\n\n\n#### Creating new Paypal billing plans\n\nThe `manage.py djpaypal_upload_plans` management command creates billing plans using\nthe Paypal API. An extra `PAYPAL_PLANS` setting must be set, which will contain a dict\nof Paypal billing plans to create.\n\nSee `example_settings.py` for an example of plans to create.\n\n\n## Webhooks\n\nThe `djpaypal.views.ProcessWebhookView` view should be hooked up to an URL endpoint\nwhich you then set up in Paypal as a webhook endpoint (https://developer.paypal.com).\n\nIn order to verify webhooks being transmitted to your app, dj-paypal needs to know the\nID of the webhook that is expected at that URL. Set it in the setting `PAYPAL_WEBHOOK_ID`.\n\n\n## Sandbox vs. Live\n\nAll models have a `livemode` boolean attribute. That attribute is set to `True` if created\nin Live (production) mode, `False` otherwise (sandbox mode).\nSandbox and Live data can co-exist without issues. Once you are done testing in Sandbox\nmode, use the `manage.py djpaypal_delete_all_test_data` management command to (locally)\nclear all the test data. This command has no impact on the upstream data.\n\n\n## Data considerations\n\nMost of the models defined in dj-paypal are copies of the upstream Paypal model data.\nDeleting or editing objects (be it from the admin or in the database) does not actually\nchange any of the upstream Paypal data.\n\n\n## License and Sponsorship\n\nThis project was designed and developed by [HearthSim](https://hearthsim.net). It is\nlicensed under the MIT license. The full license text is available in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhearthsim%2Fdj-paypal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhearthsim%2Fdj-paypal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhearthsim%2Fdj-paypal/lists"}