{"id":21068934,"url":"https://github.com/brandcom/cakephp-paypal","last_synced_at":"2025-03-14T02:23:43.091Z","repository":{"id":56997221,"uuid":"365951449","full_name":"brandcom/cakephp-paypal","owner":"brandcom","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-22T20:02:28.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"4.x","last_synced_at":"2025-02-20T05:47:16.708Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/brandcom.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-10T07:13:44.000Z","updated_at":"2022-03-17T07:36:06.000Z","dependencies_parsed_at":"2024-11-19T18:40:47.663Z","dependency_job_id":"3d4bee5c-6374-422c-9eb4-f6eab98c33bc","html_url":"https://github.com/brandcom/cakephp-paypal","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"ae4ce6e90020e3530c62c71c5fcecc7970b40757"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandcom%2Fcakephp-paypal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandcom%2Fcakephp-paypal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandcom%2Fcakephp-paypal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandcom%2Fcakephp-paypal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brandcom","download_url":"https://codeload.github.com/brandcom/cakephp-paypal/tar.gz/refs/heads/4.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243510056,"owners_count":20302296,"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-19T18:29:30.873Z","updated_at":"2025-03-14T02:23:43.032Z","avatar_url":"https://github.com/brandcom.png","language":"PHP","funding_links":["https://developer.paypal.com/api/nvp-soap/paypal-payments-standard/gs-PayPalPaymentsStandard/","https://developer.paypal.com/tools/sandbox/"],"categories":[],"sub_categories":[],"readme":"# PayPal Plugin for Cakephp 4.x\n\n## Installation and Usage\n\nInstall the Plugin\n\n```\ncomposer require jbennecker/cakephp-paypal\n```\n\n\nLoad the Plugin\n\n```\n$ bin/cake plugin load PayPal\n```\n\nRun Plugin Migrations\n\n```\n$ bin/cake migrations migrate -p PayPal\n```\n\nAdd a file called `app_paypal.php` to your config folder and enter the following info\n\n```\n\u003c?php\n\nreturn [\n    'PayPal' =\u003e [\n        'currency' =\u003e 'EUR',\n    ],\n];\n```\n\nThe Plugin expects that you have a table called orders and the corresponding entity and table classes. The Order Entity\nclass must implement the PayPal OrderInterface\n\n```\nuse PayPal\\Model\\Entity\\OrderInterface;\n\nclass Order extends Entity implements OrderInterface\n{}\n```\n\nAnd OrdersTable must implement \\PayPal\\Model\\TableOrdersTableInterface\n\n```\nuse PayPal\\Model\\TableOrdersTableInterface;\n\nclass OrdersTable extends Table implements OrdersTableInterface\n{}\n```\n\nAfter you have saved an order you can redirect the user to PayPal using this:\n\n```\nreturn $this-\u003eredirect([\n    'plugin' =\u003e 'PayPal',\n    'controller' =\u003e 'Paypals',\n    'action' =\u003e 'pay',\n    $order-\u003eid,\n]);\n```\n\nThis will redirect your customer to PayPal. After the customer has successfully paid, he will be redirected to\n\n```\nRouter::url(['controller' =\u003e 'Orders', 'action' =\u003e 'confirm'], true);\n```\n\nPayPal will send an IPN to the Plugin. If the IPN successfully\nvalidated, the Plugin calls an Callbackmethod on your OrdersTable class.\n\nPayPal will send an IPN to the Plugin. If the IPN was successfully\nvalidated, the Plugin calls the afterPayment-Callback on your Table-Class.\n\nThis Plugin uses [PayPal Payments Standard](https://developer.paypal.com/api/nvp-soap/paypal-payments-standard/gs-PayPalPaymentsStandard/) \n\nSee [PayPal sandbox testing guide](https://developer.paypal.com/tools/sandbox/) for using Sandbox testing accounts.\n\n\n```\npublic function afterPayment(Order $order): void\n{\n    // Further process the order\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandcom%2Fcakephp-paypal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandcom%2Fcakephp-paypal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandcom%2Fcakephp-paypal/lists"}