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

You must provide an api key for the PrintNode driver. #93

Open
piloufaces opened this issue Jun 23, 2024 · 0 comments
Open

You must provide an api key for the PrintNode driver. #93

piloufaces opened this issue Jun 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@piloufaces
Copy link

Laravel Printing Version

V3.0.4

Laravel Version

V11

Print Driver

Printnode

Bug description

Hi,

I try to setup the API key on the fly and something goes wrong.
Here my function (API-Key is replaced by the real API key of course);

public function imp_etiquette($id, $nb_etiquette)
{

    app(\Rawilk\Printing\Api\PrintNode\PrintNode::class)->setApiKey('API-Key');

    // Produit
    $ClassProduit = new ClassProduit;
    $produit =  $ClassProduit->load_product_stock($id);

        $barcode = $produit->barcode;

        $etiquette = '
        ^XA
        ^LH0,0     
        ^FO220,10^ADNB,20,10^FD'.$produit->intitule.
        '^FS
        ^FO220,30^ADNB,20,10^FDLe signe des tenebres - T1
        ^FS
        ^FO250,70^BY3
        ^BEN,50,Y,N
        ^FD'.$barcode.'
        ^FS
        ^FO220,170^ADNB,20,10^FD05-11-2024
        ^FS
        ^FO500,170^ADNB,20,10^FD'.$produit->prixventettc.'€
        ^XZ 
        ';

            Printing::newPrintTask()
            ->printer('73300817')
            ->content($etiquette)
            ->copies($nb_etiquette)
            ->send();        
}

If I setup the API Key in the .env, wxorking fine.

Any idea ?

Thanks.

Steps to reproduce

No response

Relevant log output

No response

@piloufaces piloufaces added the bug Something isn't working label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant