Fix bug in capture payment API