Adde but Mutex to the payment code but still it's thread-unsafe