| 1 | -- +--------------------------------------------------------------------+ |
| 2 | -- | Copyright CiviCRM LLC. All rights reserved. | |
| 3 | -- | | |
| 4 | -- | This work is published under the GNU AGPLv3 license with some | |
| 5 | -- | permitted exceptions and without any warranty. For full license | |
| 6 | -- | and copyright information, see https://civicrm.org/licensing | |
| 7 | -- +--------------------------------------------------------------------+ |
| 8 | -- This script instantiates a PayPal Pro payment processor and assigns it to all existing contribution pages |
| 9 | -- and events for a demo or test site. The processor setup uses a valid test account and a fake live account. |
| 10 | -- This script also sets Outbound Email preferences to SMTP, localhost, port 25 |
| 11 | -- This script should be run after sample data is loaded (civicrm_generated.mysql). |
| 12 | |
| 13 | SELECT @ppTypeID := id FROM civicrm_payment_processor_type WHERE name = 'PayPal'; |
| 14 | |
| 15 | INSERT INTO `civicrm_payment_processor` (`id`, `name`, `description`, `payment_processor_type_id`, `is_active`, `is_default`, `is_test`, `user_name`, `password`, `signature`, `url_site`, `url_api`, `url_recur`, `url_button`, `subject`, `class_name`, `billing_mode`, `is_recur`, `domain_id`) VALUES (3, 'PP Pro', '', @ppTypeID, 1, 1, 0, 'xxx', 'yyy', 'zzz', 'https://www.paypal.com/', 'https://api-3t.paypal.com/', NULL, 'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', NULL, 'Payment_PayPalImpl', 3, 1, 1); |
| 16 | INSERT INTO `civicrm_payment_processor` (`id`, `name`, `description`, `payment_processor_type_id`, `is_active`, `is_default`, `is_test`, `user_name`, `password`, `signature`, `url_site`, `url_api`, `url_recur`, `url_button`, `subject`, `class_name`, `billing_mode`, `is_recur`, `domain_id`) VALUES (4, 'PP Pro', '', @ppTypeID, 1, 0, 1, 'dave_api1.northtower.com', 'S5YW42RS7WRWT9AD', 'AUsrQDMAfRs6zQSEYuw3M4QDuTBHAAvpXf7N0jYi8G1UCfKRI2NrvWVM', 'https://www.sandbox.paypal.com/', 'https://api-3t.sandbox.paypal.com/', NULL, 'https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif', NULL, 'Payment_PayPalImpl', 3, 1, 1); |
| 17 | |
| 18 | SET @pp := LAST_INSERT_ID(); |
| 19 | |
| 20 | UPDATE `civicrm_contribution_page` |
| 21 | SET payment_processor = @pp; |
| 22 | |
| 23 | UPDATE `civicrm_event` |
| 24 | SET payment_processor = @pp; |