Add test for payment method externalKey and fix bugs found in the way ;-)