Paymentsmockflow

adapt to our style of testing:
- run by npm
- fix some issues that occurred while running the tests