src/Service/DefaultInstallationService.php
public function install()
    {
        $publicKey = $this->certificateStorage->load(CertificateType::PUBLIC_KEY());

        $response = $this->sendInstallationPostRequest(
            '/v1/installation',
            [
                'json' => [
                    'client_public_key' => $publicKey->toString(),
                ],
            ]
        );

        $responseArray = \json_decode((string)$response->getBody(), true);

        return [
            'token'      => $responseArray['Response'][1]['Token']['token'],
            'public_key' => $responseArray['Response'][2]['ServerPublicKey']['server_public_key'],
        ];
    }
public function install()
    {
        $publicKey = $this->certificateStorage->load(CertificateType::PUBLIC_KEY());

        $response = $this->sendInstallationPostRequest(
            '/v1/installation',
            [
                'json' => [
                    'client_public_key' => $publicKey->toString(),
                ],
            ]
        );

        $responseArray = \json_decode((string)$response->getBody(), true);

        return [
            'token'      => $responseArray['Response'][1]['Token']['token'],
            'public_key' => $responseArray['Response'][2]['ServerPublicKey']['server_public_key'],
        ];
    }
public function install ( ) { $ publicKey = $ this -> certificateStorage -> load ( CertificateType :: PUBLIC_KEY ( ) ) ; $ response = $ this -> sendInstallationPostRequest ( '/v1/installation' , [ 'json' => [ 'client_public_key' => $ publicKey -> toString ( ) , ] , ] ) ; $ responseArray = \ json_decode ( ( string ) $ response -> getBody ( ) , true ) ; return [ 'token' => $ responseArray [ 'Response' ] [ 1 ] [ 'Token' ] [ 'token' ] , 'public_key' => $ responseArray [ 'Response' ] [ 2 ] [ 'ServerPublicKey' ] [ 'server_public_key' ] , ] ; }
Registers your public key with the Bunq API.

@return array
Registers your public key with the Bunq API .