Skip to content

Instantly share code, notes, and snippets.

@andrekutianski
Created August 8, 2017 01:59
Show Gist options
  • Save andrekutianski/6929fac1157c0da741fc8c3cd3f09d62 to your computer and use it in GitHub Desktop.
Save andrekutianski/6929fac1157c0da741fc8c3cd3f09d62 to your computer and use it in GitHub Desktop.
busca informações da fatura no banco local para comparação e verificação
// busca o usuario no banco local
$iuguClientId = iugu_boleto_search_client( $userid );
// se não retornar o usuário, presume-se que ele não existe. Então vamos cadastra-lo.
if( !$iuguClientId ){
try {
$iuguClientId = iugu_boleto_add_client( $params );
}catch (\Exception $e) {
echo "Não foi possível cadastrar o cliente na Iugu. {$e->getMessage()}";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment