WAMP server uses php.ini located in apache bin folder. eg.

C:\wamp\bin\apache\Apache2.4.4\bin\php.ini

Whereas composer looks at PHP from CLI, and locates ini at location,

C:\wamp\bin\php\php5.4.16\php.ini

So you need to update/enable openssl in this file.

open php.ini and search 'openssl', change following

;extension=php_openssl.dll

to

extension=php_openssl.dll

and you are done