4 ms·
Not quite. `txn.save!` just writes the data to the database. The call to do the actual processing happens earlier, on the line beginning with `charge = Stripe::
by micaeked 13y ago
Not quite. `txn.save!` just writes the data to the database. The call to do the actual processing happens earlier, on the line beginning with `charge = Stripe::Charge.create(`.
RE the poll: I tend to do doubling polls for stuff like this (500ms, 1s, 2s, 4s, 8s, etc), but in this case I don't think it matters, since all the server does is one database lookup and render as json.
Side note to OP: It seems like a bad idea to use the auto-incremented id as a key for polling, since it would allow an attacker to get full details of all transactions.