SQL demo server insert protection: payflow org settings
authorBill Erickson <berickxx@gmail.com>
Tue, 25 Oct 2016 21:28:36 +0000 (17:28 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/sql/schema/deploy/payflow-hosted-static-silent-post-url.sql

index 9251903..75de9a4 100644 (file)
@@ -3,15 +3,22 @@
 
 BEGIN;
 
-INSERT INTO config.org_unit_setting_type 
-    (name, label, description, datatype, view_perm, update_perm, grp)
-VALUES
-    (
-        'credit.processor.payflowhosted.skip_silent_post_url',
-        'PayflowHosted: Avoid dynamic Silent POST URL',
-        'Let PP use the Silent Post URL configured in the PayPal Manager ' ||
-        'instead of sending our a dynamic (Apache host-based) URL',
-        'bool', 1005, 1006, 'credit'
-    );
+DO $$
+BEGIN
+    IF evergreen.insert_on_deploy() THEN
+
+    INSERT INTO config.org_unit_setting_type 
+        (name, label, description, datatype, view_perm, update_perm, grp)
+    VALUES
+        (
+            'credit.processor.payflowhosted.skip_silent_post_url',
+            'PayflowHosted: Avoid dynamic Silent POST URL',
+            'Let PP use the Silent Post URL configured in the PayPal Manager ' ||
+            'instead of sending our a dynamic (Apache host-based) URL',
+            'bool', 1005, 1006, 'credit'
+        );
+
+    END IF; -- insert_on_deploy
+END $$;
 
 COMMIT;