Skip to content

passing headers #211

Open
Open
@lorvent

Description

@lorvent

Hello all,
I am using a payment gateway which requires sending auth details over headers.

so i am using this code now

$httpResponse = $this->httpClient->request('POST', $this->getEndpoint(),['headers'=> $headers, 'body' => json_encode($data)]);

        return $this->response = new PurchaseResponse($this, json_decode((string) $httpResponse->getBody(), true));

but it always says Authentication credentials were not provided

i tried passing headers as 3rd parameter...still no luck.

can anyone help me fixing this please?

PS: i tried looking guzzle 6 docs but still no luck.

thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions