This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| insert new EmailTemplate( | |
| FolderId = UserInfo.getOrganizationId(), | |
| Name = 'One-Off Donation Confirmation (NPSP+)', | |
| IsActive = true, | |
| UIType = 'SFX', | |
| DeveloperName = 'npsp_plus_One_Off_Donation_Confirmation', | |
| TemplateType = 'custom', | |
| Subject = 'Donation Confirmation', | |
| HTMLValue = '<html> <head> <title></title> </head> <body style="height: auto; min-height: auto;"> <meta /> <span style="font-family:Arial,Helvetica,sans-serif;">Dear {{{Recipient.FirstName}}},<br /> <br /> Thank you for your support. Please confirm your donation payment using this link: <a href="{{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}" target="blank">Donate</a><br /> <br /> Please contact us if you have any question.<br /> <br /> Thank you,<br /> NPSP+</span> <hr /> <img src="https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl={{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}&choe=UTF-8" /> </body></html>', | |
| RelatedEntityType = 'npsp_plus__Form_Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| insert new EmailTemplate( | |
| FolderId = UserInfo.getOrganizationId(), | |
| Name = 'One-Off Donation Confirmation (NPSP+)', | |
| IsActive = true, | |
| UIType = 'SFX', | |
| DeveloperName = 'npsp_plus_One_Off_Donation_Confirmation', | |
| TemplateType = 'custom', | |
| Subject = 'Donation Confirmation', | |
| HTMLValue = '<html> <head> <title></title> </head> <body style="height: auto; min-height: auto;"> <meta /> <span style="font-family:Arial,Helvetica,sans-serif;">Dear {{{Recipient.FirstName}}},<br /> <br /> Thank you for your support. Please confirm your donation payment using this link: <a href="{{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}" target="blank">Donate</a><br /> <br /> Please contact us if you have any question.<br /> <br /> Thank you,<br /> NPSP+</span> <hr /> <img src="https://chart.googleapis.com/chart?cht=qr&chs=200x200&chl={{{npsp_plus__Form_Submission__c.npsp_plus__Donate_URL__c}}}&choe=UTF-8" /> </body></html>', | |
| RelatedEntityType = 'npsp_plus__Form_Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class DateFormat { | |
| private static final Map<String, Integer> MONTHS = new Map<String, Integer> { | |
| 'Jan' => 1, 'Feb' => 2, 'Mar' => 3, 'Apr' => 4, 'May' => 5, 'Jun' => 6, | |
| 'Jul' => 7, 'Aug' => 8, 'Sep' => 9, 'Oct' => 10, 'Nov' => 11, 'Dec' => 12 | |
| }; | |
| public static Datetime fromRFC1123(String x) { | |
| String[] dateParts = x.split('[\\s:]'); | |
| Integer year = Integer.valueOf(dateParts[3]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global class SendEmailTemplate { | |
| @InvocableMethod(label='Send Email using Template') | |
| global static void sendEmail(List<EmailRequest> requests) { | |
| try{ | |
| for (EmailRequest request : requests) { | |
| Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); | |
| if(String.isNotBlank(request.fromEmailAddress)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: 2 | |
| jobs: | |
| build: | |
| docker: | |
| - image: circleci/node:latest | |
| steps: | |
| - checkout | |
| - run: | |
| name: Install Dependencies | |
| command: . build/install.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <apex:page id="Donate" | |
| showHeader="false" | |
| sideBar="false" | |
| standardStylesheets="false" | |
| applyHtmlTag="false" | |
| applyBodyTag="false" | |
| title="Donate" | |
| docType="html-5.0" | |
| controller="DonateCtrl" | |
| action="{!handleInit}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "dto": { | |
| "recurring": { | |
| "amounts": [ | |
| { | |
| "description": "Huge Support", | |
| "amount": 50, | |
| "isEnabled": true | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @IsTest | |
| private class vertic_CSVGeneratorTest { | |
| static testMethod void testBehavior() { | |
| String csv = new vertic_CSVGenerator(new List<String>{ | |
| 'col1', 'col2' | |
| }, new List<List<String>>{ | |
| new List<String>{ | |
| 'val 1', 'val "2' | |
| } | |
| }).toString(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public virtual class vertic_CSVGenerator extends vertic_DelimiterSeparatedGenerator { | |
| public vertic_CSVGenerator(List<String> headers, List<List<String>> rows) { | |
| super(headers, rows); | |
| } | |
| public override String toString(){ | |
| return super.toString(',', '\n'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public virtual class vertic_DelimiterSeparatedGenerator { | |
| public vertic_DelimiterSeparatedGenerator(List<String> headers, List<List<String>> rows) { | |
| this.headers = headers; | |
| this.rows = rows; | |
| } | |
| private List<String> headers; | |
| private List<List<String>> rows; |