{"id":17295228,"url":"https://github.com/rodriandreotti/payment-module","last_synced_at":"2025-07-18T23:06:45.118Z","repository":{"id":56980449,"uuid":"233717475","full_name":"RodriAndreotti/payment-module","owner":"RodriAndreotti","description":"Módulo para pagamentos muiti-gateway que abstrai as particularidades de cada api proprietária em uma interface comum, simplificando a implementação de vários Gateways de pagamento","archived":false,"fork":false,"pushed_at":"2020-06-17T01:17:39.000Z","size":49,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T20:16:06.550Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RodriAndreotti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-13T23:51:02.000Z","updated_at":"2025-02-07T16:48:24.000Z","dependencies_parsed_at":"2022-08-21T08:40:42.703Z","dependency_job_id":null,"html_url":"https://github.com/RodriAndreotti/payment-module","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/RodriAndreotti/payment-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RodriAndreotti%2Fpayment-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RodriAndreotti%2Fpayment-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RodriAndreotti%2Fpayment-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RodriAndreotti%2Fpayment-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RodriAndreotti","download_url":"https://codeload.github.com/RodriAndreotti/payment-module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RodriAndreotti%2Fpayment-module/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265849011,"owners_count":23838195,"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-10-15T11:09:45.372Z","updated_at":"2025-07-18T23:06:45.070Z","avatar_url":"https://github.com/RodriAndreotti.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# payment-module\nMódulo para pagamentos muiti-gateway que abstrai as particularidades de cada api proprietária em uma interface comum, simplificando a implementação de vários Gateways de pagamento\n\n\n# Meios de pagamento suportados:\n- PagSeguro\n- PayPal\n\n# Forma de uso Uso\n\n### Implementando as interfaces\n- Implemente a interface \\Payment\\Generic\\ProductInterface nos produtos que poderão ser pagos através do módulo\n- Implemente a interface \\Payment\\Generic\\Payer em sua classe de cliente\n\n### Configuração para o os meios de pagamento\n\n\n    $config = array(\n        // PagSeguro\n        'pagseguro_email' =\u003e 'email_assigned_to_your_account',\n        'pagseguro_token' =\u003e 'your_app_token',\n        'pagseguro_environment' =\u003e 'sandbox', // or production\n\n\n        // Paypal\n        'paypal_cancelUrl'  =\u003e  'url_to_redirect_on_cancel_button_clicked',\n        'paypal_CliendID' =\u003e 'your_client_id',\n        'paypal_ClientSecret' =\u003e 'your_client_secret',\n        'paypal_environment' =\u003e 'sandbox', // or production\n\n        // General\n        'redirectUrl' =\u003e 'url_to_redirect_after_payment',\n        'notificationUrl' =\u003e 'url_to_notify_payment_status_changes',\n        'nome' =\u003e 'your_app_name',\n        'version' =\u003e 'your_app_version',\n    );\n\n### Chamando o método de pagamento\n\n    $paymentfactory = new \\Payment\\Factory\\PaymentFactory($config);\n    $gateway = $paymentfactory-\u003ecreatePaymentWrapper(\\Payment\\Adapter\\AdapterType::PAYPAL);\n    \n    // repetir esta linha para todos os produtos\n    $gateway-\u003eaddProduct($produto, 'BRL');\n\n    // Define o cliente\n    $gateway-\u003esetPayer($cliente);\n    \n    // Chama o método de pagamento\n    $paymentUrl = $gateway-\u003epay();\n\nO retorno do método pay() será a url de pagamento para a qual o usuário deverá ser redirecionado para realizar o pagamento.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodriandreotti%2Fpayment-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodriandreotti%2Fpayment-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodriandreotti%2Fpayment-module/lists"}