sailthru/Sailthru_Client.php
protected function prepareJsonPayload(array $data, array $binary_data = [ ]) {
        $payload = [
            'api_key' => $this->api_key,
            'format' => 'json',
            'json' => json_encode($data)
        ];
        $payload['sig'] = Sailthru_Util::getSignatureHash($payload, $this->secret);
        if (!empty($binary_data)) {
            $payload = array_merge($payload, $binary_data);
        }
        return $payload;
    }
protected function prepareJsonPayload(array $data, array $binary_data = [ ]) {
        $payload = [
            'api_key' => $this->api_key,
            'format' => 'json',
            'json' => json_encode($data)
        ];
        $payload['sig'] = Sailthru_Util::getSignatureHash($payload, $this->secret);
        if (!empty($binary_data)) {
            $payload = array_merge($payload, $binary_data);
        }
        return $payload;
    }
protected function prepareJsonPayload ( array $ data , array $ binary_data = [ ] ) { $ payload = [ 'api_key' => $ this -> api_key , 'format' => 'json' , 'json' => json_encode ( $ data ) ] ; $ payload [ 'sig' ] = Sailthru_Util :: getSignatureHash ( $ payload , $ this -> secret ) ; if ( ! empty ( $ binary_data ) ) { $ payload = array_merge ( $ payload , $ binary_data ) ; } return $ payload ; }
Prepare JSON payload
Prepare JSON payload