Sha256: ab11bcc42bf63035751f0a4227aa9a48aa8c9b44eb26fa0e8b22ad162eda6b9b
Contents?: true
Size: 626 Bytes
Versions: 47
Compression:
Stored size: 626 Bytes
Contents
module ForestLiana class StripePaymentGetter < StripeBaseGetter attr_accessor :record def initialize(params, secret_key, reference) @params = params Stripe.api_key = ForestLiana.integrations[:stripe][:api_key] end def perform query = {} @record = Stripe::Charge.retrieve(@params[:payment_id]) @record.created = Time.at(@record.created).to_datetime @record.amount /= 100.00 query[field] = @record.customer if collection @record.customer = collection.find_by(query) else @record.customer = nil end @record end end end
Version data entries
47 entries across 47 versions & 1 rubygems