16 Donations
IDonation (namespace Relatude.CMS.Models.Donations) is a generic donation node, with the list
and detail projections behind the WAF.Client Donations admin module. It does not extend IItem,
so a site that only takes donations does not pull in the content model.
| Group | Properties |
|---|---|
| identity | Id, Name, Reference (shared with the payment provider), DonationTypeId, CreatedUtc |
| the gift | Amount (whole currency units), GiftType, Frequency, PaymentMethod, Status, Anonymous, Consent, TermsAccepted |
| payment | KID (AvtaleGiro/OCR), TransactionId (card), AgreementId (recurring, such as Vipps) |
| the donor | DonorFirstName, DonorLastName, DonorEmail, DonorPhone, DonorAddress, DonorPostalCode, DonorCity |
| business gifts | CompanyName, OrganizationNumber, CorporateInvoiceEmail, OrderReference, BillingAddress, BillingPostalCode, BillingCity |
| the form | FormId (the form's content id), FormName (its name when the donation was made) |
| attribution | HttpAddress, UtmSource, UtmMedium, UtmCampaign, GaClientId, GaSessionId, FbcCookie, FbpCookie, UserAgent |
Leave the four cookie values (GaClientId, GaSessionId, FbcCookie, FbpCookie) empty when the
donor has not consented, and store UserAgent only when one of them is set.
The admin module filters these text fields case-sensitively, so store exactly these values:
| Field | Values |
|---|---|
GiftType |
private, business |
Frequency |
onetime, recurring |
PaymentMethod |
card, avtalegiro, vipps, vippsrecurring, invoice |
Status |
pending, completed, failed, cancelled, refunded |
A site extends the model with its own interface, and registers both namespaces as datamodel sources (chapter 2). A property may be declared in only one interface of the hierarchy.
namespace MySite.Models;
public interface IMyDonation : Relatude.CMS.Models.Donations.IDonation {
string Campaign { get; set; }
}- The admin contract — The admin controller lives in the host, because it derives from the host framework's admin base class (such as WAF's BaseAdminAPIController), which this package does not reference. Routed as wafapi/Donations/{action}…