{"id":21816605,"url":"https://github.com/5monkeys/ec-paypal","last_synced_at":"2025-10-08T02:32:01.820Z","repository":{"id":16970773,"uuid":"19733353","full_name":"5monkeys/ec-paypal","owner":"5monkeys","description":"PayPal Express Checkout","archived":false,"fork":false,"pushed_at":"2014-08-13T12:23:38.000Z","size":212,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-27T15:41:29.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/5monkeys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-13T09:31:20.000Z","updated_at":"2024-04-28T09:10:25.000Z","dependencies_parsed_at":"2022-09-24T11:41:31.565Z","dependency_job_id":null,"html_url":"https://github.com/5monkeys/ec-paypal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5monkeys%2Fec-paypal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5monkeys%2Fec-paypal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5monkeys%2Fec-paypal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5monkeys%2Fec-paypal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5monkeys","download_url":"https://codeload.github.com/5monkeys/ec-paypal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235674070,"owners_count":19027516,"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":[],"created_at":"2024-11-27T15:35:30.706Z","updated_at":"2025-10-08T02:31:56.490Z","avatar_url":"https://github.com/5monkeys.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"ec-paypal\n=========\n\nEasy PayPal Express Checkout using the Classic APIs for full feature set, mimicking the REST APIs.\n\n\nDjango example\n--------------\nSee mapping.py for complete payment structure\n\n```python\n# settings.py\nimport ec_paypal as paypal\n\npaypal.config.from_dict({\n    'SANDBOX': True,\n    'USERNAME': 'username',\n    'PASSWORD': 'password',\n    'SIGNATURE': 'signature',\n})\n```\n\n\n```python\n# views.py\nimport ec_paypal as paypal\n\ndef pay(request):\n    order = Order.objects...\n\n    payment = paypal.Payment({\n        'intent': 'Sale',\n        'transactions': [{\n            'tracking': {'invoice': order.reference},\n            # 'ipn_url': '...',\n            'category': 2,\n            'item_list': {\n                'items': [{\n                    'name': item.description,\n                    'price': item.amount,\n                    'quantity': item.qty\n                } for item in order.items.all],\n            },\n            'amount': {\n                'currency': 'SEK',\n                # 'details': {\n                #     'shipping': 50,\n                #     'shipping_discount': -50\n                # }\n            }\n        }],\n        'redirect_urls': {\n            'return_url': settings.PAYPAL_RETURN_URL,\n            'cancel_url': settings.PAYPAL_CANCEL_URL,\n        },\n        'page': {\n            'locale': 'sv_SE',\n            'flow': 'Sole',\n            'prompt': 'Billing',\n            'shipping_address': 2,\n            'layout': {\n                'brand': 'My Example Store',\n                'logo': 'http://example.com/img/logo.png',  # 190x60\n                'cart_color': 'e5e5e5',\n            }\n        }\n    })\n\n    # Create payment\n    response = paypal.set_express_checkout(payment.fields())\n\n    # Persist/remember PayPal token: response.id\n\n    # Redirect to PayPal\n    return redirect(response.redirect_url)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5monkeys%2Fec-paypal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5monkeys%2Fec-paypal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5monkeys%2Fec-paypal/lists"}