Rails 3: wrapping ActiveRecord operations and external credit card in a single transaction -
I am using ActiveMerchant to process a credit card transaction that can be successful or unsuccessful, which Part of some transactions, if any part of the internal accounting using activivercard processing fails, then I am not clear about how to roll back the whole transaction.
I have a payment model, and a point model - the user's digits are converted into dollars to reduce their payments.
I see how it works And believe that I callback to handle the contents like email to the user after But how can I make an unsuccessful credit card transaction as a similar rollback, which is a failed AR Rail 3.2.5, MySQL 5.1 (Indobi), Ruby 1.9.3 after_commit (and
after_rollback ).
save reason? Is it as easy as coding like
increase active activation: rollback if my non-AR transaction fails? The above document contains a section that bothers me about it (related to transactions that do not work in many database connections).
ActiveRecord :: Rollback . Feel free to increase
Comments
Post a Comment