Sha256: 7cff0edf7aa18057c6071c644b5055e6350bd24da0b902d562cf3551fc45035b
Contents?: true
Size: 677 Bytes
Versions: 12
Compression:
Stored size: 677 Bytes
Contents
module Spree class PaymentNotification < ActiveRecord::Base belongs_to :order serialize :params def self.create_from_params(params) email = Order.pag_seguro_payment_method.preferred_email token = Order.pag_seguro_payment_method.preferred_token notification_code = params[:notificationCode] notification = ::PagSeguro::Notification.new(email, token, notification_code) self.create!( params: params, order_id: notification.id, status: notification.status, transaction_id: notification.transaction_id, notification_code: notification_code ) notification end end end
Version data entries
12 entries across 12 versions & 1 rubygems