Programming MySQLi prepared statements
This is really pretty good. 
I would do a few things slightly differently.


Don't use globals. Pass the $mysqli parameter into your function. Globals cause nightmares for maintainers.
Do an explicit error check after each mysqli method invocation, and get rid of the cascading if statements. Check for a false return, then issue a message.  In your logic you might also emit the error message and then return false. But you need to announce the error somehow or other or you'll have trouble debugging things.


For example: (Note, using die is a little sloppy, but not as bad as failing to report errors.) 

 $stmt = $mysqli-&gt;prepare( 'SELECT name FROM `payment_methods` WHERE id = ?' );
 if ($stmt === false) {
         die "prepare failed:" . mysqli_connect_error();

 }