Sha256: c0ca081bce61745fe19c9d6b8b374f586c8cbedb42eb671a04a3281abe2cc766
Contents?: true
Size: 579 Bytes
Versions: 5
Compression:
Stored size: 579 Bytes
Contents
module PagSeguro class Notification < Transaction def initialize(email = nil, token = nil, notification_code=nil) raise "Needs a notification code" if notification_code.blank? raise "Needs an email" if email.blank? raise "Needs a token" if token.blank? @data = transaction_data(email, token, notification_code) end private def transaction_data(email, token, notification_code) super(RestClient.get("#{PAGSEGURO_TRANSACTIONS_URL}/notifications/#{notification_code}?email=#{email}&token=#{token}")) end end end
Version data entries
5 entries across 5 versions & 1 rubygems