Hi Joel, thanks for the reply.

The system is working well. My problem is with the state_machine gem. If the
payment fails, I can't really get it saved without doing the hack I
mentioned, becase the state_machine implementation rollback any db
transaction when you return false from an event, however, I have to return
false to tell the subscription object that the payment has failed, hence,
the subscription upgrade fails, and state_machine rollback.

It has been solved (with that hack) but I  just wanted to know if there was
a more elegant non-hackish way to do that with state_machine.

Regards,

Marcelo.

On Wed, Jan 27, 2010 at 9:09 AM, Joel Dezenzio <jdezen...@gmail.com> wrote:

> What type of payment system are you using?  IPN?
>
> If so, then once the payment reaches the payment gateway and the customer
> finishes paying, you check the status of the payment received and if
> successful, you change the subscription based off the amount(s) received.
> You are supplying information but you aren't supplying any actual methods
> so
> that we can review what you are doing.  I use an IPN system for one of my
> sites and do the above.  I'd love to help you out but without seeing code
> and how things are actually working with your controllers/models, I can't.
>
> Sincerely,
>
> Joel Dezenzio
> Website Bio:  http://jdezenzio.com/
> Rails Production Sites:  http://ncaastatpages.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to