Showing
2 changed files
with
6 additions
and
3 deletions
... | @@ -199,15 +199,18 @@ module ActsAsChargeable | ... | @@ -199,15 +199,18 @@ module ActsAsChargeable |
199 | var_payment_at: Time.zone.at(charge.paid_at)) | 199 | var_payment_at: Time.zone.at(charge.paid_at)) |
200 | return { error_message: 'Already paid' } | 200 | return { error_message: 'Already paid' } |
201 | end | 201 | end |
202 | - clean_var_variables | ||
203 | end | 202 | end |
204 | 203 | ||
205 | private | 204 | private |
206 | 205 | ||
207 | def clean_var_variables | 206 | def clean_var_variables |
208 | - update_columns(var_status: nil, var_barcode: nil, var_barcode_url: nil, | 207 | + if update_columns(var_status: nil, var_barcode: nil, var_barcode_url: nil, |
209 | var_id: nil, var_service: nil, var_payment_at: nil, | 208 | var_id: nil, var_service: nil, var_payment_at: nil, |
210 | var_payment_expires_at: nil) | 209 | var_payment_expires_at: nil) |
210 | + { object: self } | ||
211 | + else | ||
212 | + { error_message: 'Something went wrong' } | ||
213 | + end | ||
211 | end | 214 | end |
212 | end | 215 | end |
213 | end | 216 | end | ... | ... |
-
Please register or login to post a comment