Skip to content

Instantly share code, notes, and snippets.

@mazikwyry
Created December 24, 2013 10:52
Show Gist options
  • Save mazikwyry/8111620 to your computer and use it in GitHub Desktop.
Save mazikwyry/8111620 to your computer and use it in GitHub Desktop.
cancel transaction
def cancel
update_attribute(:status, "canceled")
if payment.is_a(GoCardless) && payment.status=="preauth"
pre_auth = GoCardless::PreAuthorization.find(payment.authorization)
pre_auth.cancel!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment