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
Empty file added .github/CONTRIBUTING.md
Empty file.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ISSUE_ID=$(echo "$BRANCH_NAME" | grep -o -E "$REGEX_ISSUE_ID")
COMMIT_MESSAGE=$(cat "$1")

if [ -z "$ISSUE_ID" ]; then
echo "${BRed}Branch name does not follow the expected pattern...${KN}"
echo "🛑 ${BRed} Branch name does not follow the expected pattern...${KN}"
exit 1
fi

Expand Down
3 changes: 0 additions & 3 deletions .husky/pre-commit

This file was deleted.

37 changes: 37 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env sh

echo "============================================="
echo "Running pre-push hook 🚀"
echo "============================================="
echo "\n"
echo "============================================="
echo "Running pint tests 🧪"
echo "============================================="

pint_output=$(./vendor/bin/pint --test 2>&1)

if [ $? -ne 0 ]; then
echo "Pint tests failed. Please fix the issues before pushing."
exit 1
fi

echo "🟢 Pint Ok!"

echo "\n"

echo "============================================="
echo "Running pest tests 🧪"
echo "============================================="

# pest_output=$(./vendor/bin/pest --colors=always --stop-on-failure 2>&1)

# if [ $? -ne 0 ]; then
# echo "🛑 Pest tests failed. Please fix the issues before pushing."
# echo "$pest_output"
# exit 1
# fi

# echo "🟢 Pest Ok!"
# echo "\n"

exit 0
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ O PHPay é uma biblioteca que ajuda desenvolvedores e empresas a integrarem faci
## 🚀 Principais Recursos

Integração com o Asaas para:
Gerenciamento de clientes.
Criação e envio de cobranças.
Consultas de pagamentos e QR Codes.
Fácil de usar: configuração mínima para começar.
Extensível: suporte para novos gateways será adicionado em breve.

- Gerenciamento de clientes.
- Criação e envio de cobranças.
- Consultas de pagamentos e QR Codes.
- Fácil de usar: configuração mínima para começar.
- Extensível: suporte para novos gateways será adicionado em breve.

📦 Instalação
Instale via Composer:

Expand All @@ -28,8 +30,6 @@ require 'vendor/autoload.php';

use PHPay\PHPay;

$asaas = PHPay::asaas('SUA_CHAVE_API');

$client = [
'name' => 'João da Silva',
'cpf_cnpj' => '99999999999' // valid
Expand All @@ -41,7 +41,7 @@ $invoice = [
'description' => 'Pagamento de teste',
];

$response = $asaas
$response = PHPay::asaas('SUA_CHAVE_API')
->client($client)
->invoice($invoice)
->qrCodePix();
Expand All @@ -51,10 +51,9 @@ print_r($response);

## 📝 Roadmap

- [] Integração com o Asaas.
- [] Suporte para outros gateways (ex.: Mercado Pago, Stripe).
- [] Melhorias na documentação.
- [] Testes unitários e exemplos de uso avançado.
- Integração com Asaas.
- Integração com Efí.
- Lançamento v1.0.0

## 🌟 Contribuindo

Expand Down
15 changes: 9 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"name": "mariolucasdev/phpay",
"name": "phpay-io/phpay",
"type": "library",
"autoload": {
"psr-4": {
"PHPay\\": "src/"
"PHPay\\": "src/",
"Asaas\\": "src/Gateways/Asaas/",
"AsaasCustomer\\": "src/Gateways/Asaas/Resources/Customer/"
}
},
"authors": [
Expand All @@ -13,7 +15,7 @@
}
],
"require-dev": {
"pestphp/pest": "^3.5",
"pestphp/pest": "3.5",
"laravel/pint": "^1.18"
},
"config": {
Expand All @@ -22,10 +24,11 @@
}
},
"require": {
"laravel/framework": "^11.32",
"vlucas/phpdotenv": "^5.6"
"php": "^8.1",
"ext-curl": "*",
"guzzlehttp/guzzle": "^7.0"
},
"scripts": {
"test": "vendor/bin/pest"
}
}
}
Loading