ruby on rails - When attempting to void a Hold on balanced payments that had been captured, why is the response a Hold with is_void == true? -


when using balanced payments ruby gem (https://github.com/balanced/balanced-ruby), , using balanced::hold#void method on balanced::hold instance captured, getting balanced::hold has is_void property set true.

that doesn't seem make sense... desired functionality?

here's output rails console: https://gist.github.com/3063419

i not sure if desired functionality. happy log issue if thinks doesn't make sense.

ah, seems balanced client, in lib/balanced/resources/hold.rb#l26 not handle exception thrown when save invoked.

the proper fix be:

def void self.is_void = true begin save rescue balanced::error self.is_void = false raise end end 

i'll file github issue.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -