def cancel_card_hold(hold):
 result = braintree.Transaction.void(hold.id)
 assert result.is_success
 amount = hold.amount
 participant_id = hold.custom_fields[u'participant_id']
 log(u'Canceled a ${:.2f} hold for {}.'.format(amount, participant_id))

def cancel_card_hold ( hold ) : result = braintree . Transaction . void ( hold . id ) assert result . is_success amount = hold . amount participant_id = hold . custom_fields [ u'participant_id' ] log ( u'Canceled a ${:.2f} hold for {}.' . format ( amount , participant_id ) )
cancel the previously created hold on the participants credit card .