Rewrote plugin as merchant class and switched to HMAC authentication

Fixes #1
Fixes #2