Permalink
Browse files

Update PaypalNotification.payload to be JSON type

  • Loading branch information...
patrickod committed Feb 21, 2017
1 parent 015d455 commit fe7e696a88f606698228cf2f79383cadb72226e3
Showing with 3 additions and 3 deletions.
  1. +1 −1 app/models/paypal_notification.rb
  2. +1 −1 db/migrate/20170220233007_create_paypal_notifications.rb
  3. +1 −1 db/schema.rb
@@ -13,7 +13,7 @@ def self.verify_raw_payload(raw_payload)
def self.create_from_payload(payload)
create!(
notification_id: payload["txn_id"],
payload: payload.to_json
payload: payload
)
end
end
@@ -2,7 +2,7 @@ class CreatePaypalNotifications < ActiveRecord::Migration[5.0]
def change
create_table :paypal_notifications do |t|
t.string :notification_id, null: false
t.text :payload, null: false
t.json :payload, null: false
t.datetime :processed_at
t.timestamps
end
@@ -36,7 +36,7 @@
create_table "paypal_notifications", force: :cascade do |t|
t.string "notification_id", null: false
t.text "payload", null: false
t.json "payload", null: false
t.datetime "processed_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false

0 comments on commit fe7e696

Please sign in to comment.