Skip to content

Error Guia de Remisión ApiFactory::addSeconds() #250

Description

@DaveARG

Cuando envío una guía de remisión sale este error:
Argument 2 passed to Greenter\\Api\\ApiFactory::addSeconds() must be of the type int, null given, called in /vendor\/greenter\/ws\/src\/Api\/ApiFactory.php on line 82

En esa linea está esto (Greenter v. 5.0):
$expire = $this->addSeconds(new DateTime(), $result->getExpiresIn());

Al parecer getExpiresIn() devuelve null

Esta es la forma en la que hago el envío:

    $util = Util::getInstance();
    $util->setRuc($this->ruc);
    $util->setClave($this->claveSol);
    $util->setUsuario($this->usuarioSol);
    $util->setClientCecredGRE($this->clientCecredGRE);
    $util->setClientIdGRE($this->clientIdGRE);
    $api = $util->getSeeApiSunat($this->endpointGui);
    $res = $api->sendXml($nombreDocumento, $contenidoDocumento);

El error lo da la linea de sendXml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions