Sha256: c687069b12bdcdae6b517a2cae9575421323fc3fb426e858d2e5796c816c9710
Contents?: true
Size: 596 Bytes
Versions: 10
Compression:
Stored size: 596 Bytes
Contents
module Pay module Stripe module Charge extend ActiveSupport::Concern def stripe? processor == "stripe" end def stripe_charge Stripe::Charge.retrieve(processor_id) rescue ::Stripe::StripeError => e raise Error, e.message end def stripe_refund!(amount_to_refund) Stripe::Refund.create( charge: processor_id, amount: amount_to_refund ) update(amount_refunded: amount_to_refund) rescue ::Stripe::StripeError => e raise Error, e.message end end end end
Version data entries
10 entries across 10 versions & 1 rubygems