bitpay / php-bitpay-client

PHP implementation for the BitPay cryptographically secure RESTful API
MIT License
166 stars 147 forks source link

Merchant token bug using bcmath #236

Closed quantumwebco closed 6 years ago

quantumwebco commented 7 years ago

When using the code

    $tokenOptions = [
     'facade' => 'merchant',
     'label' => 'Merchant token',
     'id' => (string) $sin, 
    ];
    $getToken = $client->createToken($tokenOptions);
    $response = $client->getResponse();
    $data = json_decode($response->getBody())->data[0];

The token returned is not enough characters and is not accepted by the API. It's seems like it's only returning half the token. It's only 22 characters and a proper token is 44.