From da379f025eb765fdd493d557f93900ab398ee92a Mon Sep 17 00:00:00 2001 From: Jamie Dwyer Date: Tue, 28 Mar 2017 18:09:45 -0400 Subject: [PATCH] Remove references to deprecated signature --- 01 Getting Started/app.rb | 4 ++-- 02 Charging For Your App/app.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/01 Getting Started/app.rb b/01 Getting Started/app.rb index b37c5e6..be516cc 100644 --- a/01 Getting Started/app.rb +++ b/01 Getting Started/app.rb @@ -42,7 +42,7 @@ def initialize # create webhook for order creation if it doesn't exist create_order_webhook - + # now that the session is activated, redirect to the bulk edit page redirect bulk_edit_url end @@ -125,7 +125,7 @@ def instantiate_session(shop) end def validate_hmac(hmac,request) - h = request.params.reject{|k,_| k == 'hmac' || k == 'signature'} + h = request.params.reject{|k,_| k == 'hmac'} query = URI.escape(h.sort.collect{|k,v| "#{k}=#{v}"}.join('&')) digest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), API_SECRET, query) diff --git a/02 Charging For Your App/app.rb b/02 Charging For Your App/app.rb index c6fa6f5..4e719e0 100644 --- a/02 Charging For Your App/app.rb +++ b/02 Charging For Your App/app.rb @@ -136,7 +136,7 @@ def instantiate_session(shop) end def validate_hmac(hmac,request) - h = request.params.reject{|k,_| k == 'hmac' || k == 'signature'} + h = request.params.reject{|k,_| k == 'hmac'} query = URI.escape(h.sort.collect{|k,v| "#{k}=#{v}"}.join('&')) digest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), API_SECRET, query)