Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## O que muda

<!-- Descreva a mudança e o problema que ela resolve. -->

## Por quê

<!-- Contexto: qual comportamento estava errado, ou o que passa a ser possível. -->

## Como testar

<!-- Passos para verificar, ou os testes que cobrem a mudança. -->

## Checklist

- [ ] `composer test` passa (Pint, Pest e PHPStan nível 9)
- [ ] Cobri a mudança com testes, usando HTTP mockado (nenhum teste acessa a rede)
- [ ] Atualizei README, CLAUDE.md ou UPGRADE.md, se a mudança afeta quem usa a biblioteca
- [ ] Nenhuma credencial, token ou dado pessoal real foi commitado
- [ ] **Li e aceito o [Contributor License Agreement](../CLA.md)**

<!-- Se a mudança quebra compatibilidade, descreva o de-para para quem migra. -->
77 changes: 77 additions & 0 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributor License Agreement (CLA)

> Este acordo passa a valer para contribuições aceitas a partir de 2026-09-20.
> Contribuições anteriores permanecem sob a Licença MIT, sob a qual foram
> enviadas.

Ao enviar uma contribuição para o PHPay (`phpay-io/phpay`), você concorda com
os termos abaixo.

## 1. Definições

**"Contribuição"** é qualquer trabalho original de autoria — código,
documentação, testes, exemplos ou configuração — que você envie
intencionalmente ao projeto, por pull request, issue, ou qualquer outro meio.

**"Você"** é a pessoa física ou jurídica que envia a Contribuição.

**"Projeto"** é o PHPay, mantido por Mário Lucas.

## 2. Concessão de direitos autorais

Você concede ao mantenedor do Projeto uma licença perpétua, mundial, não
exclusiva, gratuita, irrevogável e **sublicenciável** para reproduzir,
modificar, exibir, distribuir e criar trabalhos derivados da sua Contribuição,
sob **qualquer licença** que o Projeto adote — presente ou futura.

Você **mantém a titularidade** dos direitos autorais da sua Contribuição. Esta
é uma licença, não uma cessão: você continua livre para usar seu próprio
código como quiser, inclusive em outros projetos.

## 3. Concessão de patente

Você concede uma licença de patente perpétua, mundial, não exclusiva,
gratuita e irrevogável para fazer, usar, vender e distribuir a Contribuição,
limitada às reivindicações de patente que você controla e que são
necessariamente infringidas pela Contribuição.

Se alguém iniciar litígio de patente alegando que a Contribuição infringe uma
patente, as licenças concedidas a essa pessoa por este acordo terminam.

## 4. Suas declarações

Você declara que:

- A Contribuição é um trabalho original seu, ou você tem o direito de
submetê-la sob estes termos;
- A Contribuição não infringe direitos de terceiros que você conheça;
- Se você contribui no curso do seu emprego, **seu empregador autorizou** a
contribuição, ou renunciou aos direitos sobre ela;
- Você não inclui código de terceiros sem identificar claramente a origem e a
licença.

## 5. Sem garantias

A Contribuição é fornecida "no estado em que se encontra", sem garantias de
qualquer natureza, exceto as declarações do item 4.

## 6. Por que este acordo existe

O PHPay é distribuído sob a [Business Source License 1.1](./LICENSE.md), e
converte para MIT na Change Date. Para que o Projeto possa fazer essa
conversão — e oferecer licenças comerciais a quem precisa de termos diferentes
— o mantenedor precisa ter o direito de sublicenciar todo o código, inclusive
o seu.

Sem este acordo, cada mudança de licença exigiria localizar e obter o aceite
individual de todos os contribuidores, o que na prática congela o projeto.

## Como aceitar

Marque a caixa correspondente no template de pull request. Isso registra seu
aceite de forma verificável no histórico do repositório.

---

*Este documento não é parecer jurídico. Se a sua contribuição vem de um
contexto corporativo, consulte o jurídico da sua empresa antes de aceitar.*
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,21 @@ composer lint # corrige o estilo automaticamente
Nenhum teste pode acessar a rede: os recursos aceitam um `GuzzleHttp\Client` injetado,
e a suíte usa o helper `mockClient()` de `tests/Pest.php` para responder com dados fixos.

## 📜 Licença e CLA

O PHPay é distribuído sob a [Business Source License 1.1](./LICENSE.md) a
partir da versão 2.0.0 — *source-available*, com uso em produção liberado e uma
única restrição: não revender o PHPay como produto concorrente. As versões
1.0.x permanecem sob MIT.

Contribuições enviadas a partir de 2026-09-20 estão sujeitas ao
[Contributor License Agreement](./CLA.md). Você **mantém a titularidade** do
seu código; o que o CLA concede é o direito de sublicenciá-lo junto com o
projeto, para que a conversão automática para MIT na Change Date seja possível
sem precisar localizar cada contribuidor.

O aceite é registrado marcando a caixa no template de pull request.

## ✉️ Entre em contato

Caso tenha dúvidas ou precise de ajuda, sinta-se à vontade para abrir uma issue ou entrar em contato com a equipe de mantenedores.
Expand Down
12 changes: 12 additions & 0 deletions LICENSE-MIT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
> Licença das versões **1.0.0 e 1.0.1** do PHPay, preservada para referência.
> A partir da 2.0.0 vale a [Business Source License 1.1](./LICENSE.md).

# Licença MIT

Copyright (c) 2024 PHPay | Mário Lucas

A permissão é concedida, gratuitamente, a qualquer pessoa que obtenha uma cópia deste software e dos arquivos de documentação associados (o "Software"), para lidar com o Software sem restrição, incluindo, sem limitação, os direitos de usar, copiar, modificar, mesclar, publicar, distribuir, sublicenciar e/ou vender cópias do Software, e permitir que as pessoas a quem o Software é fornecido o façam, sujeito às seguintes condições:

O aviso de copyright acima e este aviso de permissão devem ser incluídos em todas as cópias ou partes substanciais do Software.

O SOFTWARE É FORNECIDO "COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO ÀS GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UM PROPÓSITO ESPECÍFICO E NÃO INFRAÇÃO. EM NENHUM CASO OS AUTORES OU DETENTORES DE DIREITOS AUTORAIS SERÃO RESPONSÁVEIS POR QUALQUER RECLAMAÇÃO, DANO OU OUTRA RESPONSABILIDADE, SEJA EM UMA AÇÃO DE CONTRATO, DELITO OU DE OUTRA FORMA, DECORRENTE DE OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTRAS NEGOCIAÇÕES NO SOFTWARE.
107 changes: 102 additions & 5 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,106 @@
# Licença MIT
# Business Source License 1.1

Copyright (c) 2024 PHPay | Mário Lucas
## Parameters

A permissão é concedida, gratuitamente, a qualquer pessoa que obtenha uma cópia deste software e dos arquivos de documentação associados (o "Software"), para lidar com o Software sem restrição, incluindo, sem limitação, os direitos de usar, copiar, modificar, mesclar, publicar, distribuir, sublicenciar e/ou vender cópias do Software, e permitir que as pessoas a quem o Software é fornecido o façam, sujeito às seguintes condições:
**Licensor:** Mário Lucas (PHPay)

O aviso de copyright acima e este aviso de permissão devem ser incluídos em todas as cópias ou partes substanciais do Software.
**Licensed Work:** PHPay, version 2.0.0 and later.
The Licensed Work is © 2026 Mário Lucas and PHPay contributors.

O SOFTWARE É FORNECIDO "COMO ESTÁ", SEM GARANTIA DE QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO ÀS GARANTIAS DE COMERCIALIZAÇÃO, ADEQUAÇÃO A UM PROPÓSITO ESPECÍFICO E NÃO INFRAÇÃO. EM NENHUM CASO OS AUTORES OU DETENTORES DE DIREITOS AUTORAIS SERÃO RESPONSÁVEIS POR QUALQUER RECLAMAÇÃO, DANO OU OUTRA RESPONSABILIDADE, SEJA EM UMA AÇÃO DE CONTRATO, DELITO OU DE OUTRA FORMA, DECORRENTE DE OU EM CONEXÃO COM O SOFTWARE OU O USO OU OUTRAS NEGOCIAÇÕES NO SOFTWARE.
**Additional Use Grant:** You may make production use of the Licensed Work,
including in closed-source and commercial software, to process payments for
yourself or for your customers.

You may **not** offer the Licensed Work, or a derivative of it, to third
parties as a payment-integration library, SDK, hosted service, or managed
service that competes with the Licensed Work — whether paid or free, and
whether standalone or as the principal value of a larger offering.

**Change Date:** 2030-09-20

**Change License:** MIT

For information about alternative licensing arrangements for the Licensed
Work, please contact fale@phpay.io.

---

## Notice

Business Source License 1.1

## Terms

The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited
production use.

Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.

If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.

All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.

You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.

Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.

This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).

TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.

MariaDB hereby grants you permission to use this License's text to license
your works, and to refer to it using the trademark "Business Source License",
as long as you comply with the Covenants of Licensor below.

## Covenants of Licensor

In consideration of the right to use this License's text and the "Business
Source License" name and trademark, Licensor covenants to MariaDB, and to all
other recipients of the licensed work to be provided by Licensor:

1. To specify as the Change License the GPL Version 2.0 or any later version,
or a license that is compatible with GPL Version 2.0 or a later version,
where "compatible" means that software provided under the Change License
can be included in a program with software provided under GPL Version 2.0
or a later version. Licensor may specify additional Change Licenses
without limitation.

2. To either: (a) specify an additional grant of rights to use that does not
impose any additional restriction on the right granted in this License, as
the Additional Use Grant; or (b) insert the text "None".

3. To specify a Change Date.

4. Not to modify this License in any other way.

---

## Versões anteriores

As versões **1.0.0 e 1.0.1** do PHPay foram publicadas sob a **Licença MIT** e
permanecem sob ela. Esta licença vale a partir da versão 2.0.0.

O texto MIT dessas versões está preservado em [LICENSE-MIT.md](./LICENSE-MIT.md).
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<a href="https://www.php.net"><img src="https://img.shields.io/badge/php-%3E%3D8.1-brightgreen.svg" alt="Versão do PHP"></a>
<a href="https://packagist.org/packages/phpay-io/phpay"><img src="https://poser.pugx.org/phpay-io/phpay/downloads" alt="Downloads"></a>
<a href="https://github.com/phpay-io/phpay/actions/workflows/tests.yml"><img src="https://github.com/phpay-io/phpay/actions/workflows/tests.yml/badge.svg?branch=develop" alt="Testes"></a>
<a href="./LICENSE.md"><img src="https://poser.pugx.org/phpay-io/phpay/license" alt="Licença"></a>
<a href="./LICENSE.md"><img src="https://img.shields.io/badge/licen%C3%A7a-BUSL--1.1-blue.svg" alt="Licença"></a>
</p>

<p align="center">
Expand Down Expand Up @@ -633,6 +633,9 @@ Dois pontos merecem auditoria de quem vem da v1:
Leia o [manual de contribuição](./CONTRIBUTING.md). Ele cobre o ambiente de
desenvolvimento, o gate de qualidade e as convenções do projeto.

Contribuições enviadas a partir de 2026-09-20 estão sujeitas ao
[Contributor License Agreement](./CLA.md), aceito por checkbox no pull request.

```bash
composer install
composer test # Pint + Pest + PHPStan nível 9
Expand All @@ -655,7 +658,31 @@ Esta é uma biblioteca de pagamentos: nunca logue, imprima ou versione tokens,

## Licença

MIT. Veja [LICENSE.md](./LICENSE.md).
O PHPay é distribuído sob a **[Business Source License 1.1](./LICENSE.md)** a
partir da versão 2.0.0. É uma licença *source-available*: o código é aberto e
auditável, com uma única restrição comercial.

**O resumo abaixo não substitui a licença** — ele existe só para você saber
rápido se precisa ler o texto completo.

| | |
| --- | --- |
| ✅ **Pode** | Usar em produção, inclusive em software fechado e comercial |
| ✅ **Pode** | Processar pagamentos seus ou dos seus clientes |
| ✅ **Pode** | Modificar, forkar, estudar e redistribuir |
| ❌ **Não pode** | Oferecer o PHPay, ou um derivado, como biblioteca, SDK ou serviço de integração de pagamentos que concorra com ele |

Ou seja: se você integra pagamentos **no seu produto**, nada muda para você. A
restrição atinge apenas quem quiser revender o próprio PHPay.

Em **2030-09-20** a licença converte automaticamente para **MIT**, e cada
versão converte no máximo quatro anos após ser publicada.

> As versões **1.0.0 e 1.0.1** foram publicadas sob MIT e **permanecem sob
> MIT** — uma licença nova não é retroativa. O texto está preservado em
> [LICENSE-MIT.md](./LICENSE-MIT.md).

Precisa de termos diferentes? Escreva para [fale@phpay.io](mailto:fale@phpay.io).

---

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"sdk efi",
"phpay"
],
"license": "MIT",
"license": "BUSL-1.1",
"autoload": {
"psr-4": {
"PHPay\\": "src/",
Expand Down
Loading