Repository navigation
PHPAY-171: doc: show the first charge as a GIF in the quickstart - #172
Merged
Merged
Conversation
The quickstart tells the flow in code, but the page never shows what happens: three requests leave a single chain, the document loses its punctuation on the way, and the amount goes out in the unit that gateway expects. The recording is the code that runs, not a mock-up — it was executed against the faked network first, and the requests on screen are the ones that actually left. The file is committed under docs/img/ on purpose: the existing cover lives in user-attachments, which is reachable only from the browser and cannot travel in a pull request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #171
O README contava o fluxo em código, mas a página não mostrava o que acontece.
O GIF entra na seção Início rápido, logo antes do bloco que já estava lá.
O que ele mostra
composer require→ a cadeia da cobrança sendo escrita → as três requisiçõesque saíram, com o CPF já sem pontuação e o valor em reais, que é a unidade do
Asaas.
O código do GIF roda
Não é encenação. O arquivo foi executado com a rede falseada
(
ClientFactory::fake()) antes de virar quadro, e as requisições na tela são asque
ClientFactory::recorded()devolveu, nessa ordem:POST /v3/customers—{"name":"Maria Oliveira","cpfCnpj":"12345678909",…}POST /v3/payments—{"billingType":"PIX",…,"value":149.9}GET /v3/payments/pay_8kz2m1/pixQrCodeAs duas linhas que o GIF comenta em cima disso — o CPF perdendo a pontuação no
Customer::make()e oMoney::reais('149,90')virando149.9porque o Asaas éde reais — são leitura desses dois corpos, não afirmação solta.
Por que versionado, e não em
user-attachmentsA capa de hoje vive em
user-attachments, que só se consegue arrastando oarquivo no navegador — não há como fazer isso dentro de um PR. São 569 KB, com
paleta de 128 cores e sem dithering, que é o que mantém o texto limpo num GIF.
Identidade
Roxo
#6565FE, roxo claro#7C7CFFe rosa#FF49AE, amostrados da própria capado README; wordmark
phpayna barra da janela e no cartão de abertura.Fora de escopo
Só o README do core. O bridge ganha o dele num PR próprio.