Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

[BUG]_Can not access to Update BILL #271

Open
StingNguyen opened this issue Apr 4, 2018 · 2 comments
Open

[BUG]_Can not access to Update BILL #271

StingNguyen opened this issue Apr 4, 2018 · 2 comments

Comments

@StingNguyen
Copy link

https://test.bitpay.com/bills/KZQKmQDfacT3uyXnp2wESj

Method: PUT

$request = $this->createNewRequest();

    $request->setMethod(Request::METHOD_PUT);
    $request->setPath('bills/'. $id);
    $body = array(
        'description'       => self::status_complete,
        'price'             => 2,
        'quantity'             => 1,
        'token'             => $this->token->getToken(),
    );
    $request->setBody(json_encode($body));
    $this->addIdentityHeader($request);
    $this->addSignatureHeader($request);
    $this->request = $request;
    $this->response = $this->sendRequest($request);

Response:

[ERROR] In CurlAdapter::sendRequest(): curl_exec failed with the error "Empty reply from server".

@StingNguyen
Copy link
Author

$request = $this->createNewRequest();

    $request->setMethod(Request::METHOD_PUT);
    $request->setPath('subscriptions/'. $params['subscriptionId']);
    $body = array(
        'status'       => self::status_cancelled,
        'token'             => $this->token->getToken(),
    );
    $request->setBody(json_encode($body));
    $this->addIdentityHeader($request);
    $this->addSignatureHeader($request);
    $this->request = $request;
    $this->response = $this->sendRequest($request);


    $body = json_decode($this->response->getBody(), true);

[ERROR] In CurlAdapter::sendRequest(): curl_exec failed with the error "Empty reply from server".

@StingNguyen
Copy link
Author

Could you help me?

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

No branches or pull requests

1 participant