Add switch statement in registry payment
Merge branch 'master' into registryPayment