Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Próximo Vencimento #24

Closed
ricatom opened this issue Jul 23, 2019 · 2 comments
Closed

Próximo Vencimento #24

ricatom opened this issue Jul 23, 2019 · 2 comments

Comments

@ricatom
Copy link

ricatom commented Jul 23, 2019

Olá, parabéns por este pacote

Gostaria de saber se tem como pegar o "Próximo Vencimento" da assinatura ?

Grato

@gabrielpeixoto
Copy link
Member

Olá @ricatom !

Não temos isso implementado no pacote. Mas você pode fazer o seguinte:

No webhook de handleInvoiceCreated e no handleInvoiceStatusChanged, você pode atualizar essa informação no seu banco.

$subscriptionIugu = $subscription->asIuguSubscription();
$next_invoice = new Carbon($subscriptionIugu->expires_at)

Testa e me diz se conseguiu

@ricatom
Copy link
Author

ricatom commented Jul 23, 2019

@gabrielpeixoto deu certinho, muito obrigado

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants