Sha256: 9b97058e605999a273f2532aa3c1ae4811dab862f92084e0c62474cd6e2df51f
Contents?: true
Size: 628 Bytes
Versions: 268
Compression:
Stored size: 628 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
268 entries across 268 versions & 1 rubygems