
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
apostrophe-donate
Advanced tools
#apostrophe-donate
apostrophe-donate
allows a developer to quickly add a donation form to a webpage on an apostrophe-sandbox-powered website.
It uses the paypal-api-sdk module to process payments and allows email configuration to the donor and recipient of the donation.
I assume you already have a nifty Apostrophe 2 project built with apostrophe-site. The easiest way is to start by cloning the apostrophe-sandbox project.
Add the module to your project:
npm install --save apostrophe-donate
In app.js
, you'll need to configure the apostrophe-donate
module, just like the rest of your modules:
'apostrophe-donate': {
// production has this in local.js
payPal: {
mode: 'sandbox',
client_id: 'xxxxxx',
client_secret: 'xxxxxx'
},
description: 'Donation for P\'unk Ave', //description of transaction
// configure the email to send to the donor
from:{
email: 'email@email.com',
name: 'First Last'
},
// configure the email to send to the recipient of the donation
recipient:{
email: 'email@gmail.com',
name: 'Recipient'
},
thankYouSubject: 'Thanks!', // subject of the email to the donor
confirmationSubject: 'Yay!' // subject of the email to send to the recipient of the donation,
// Your recaptcha 2.0 key and secret. IF YOU LEAVE THIS OUT,
// YOU *WILL* GET OWNED BY CREDIT CARD FRAUD TESTERS. DON'T
// leave this out
recaptcha: {
key: 'xxx',
secret: 'yyy'
}
}
The client_id
and client_secret
are retrieved after setting up a pro account with PayPal and registering your application.
data/local.js
configuration so as to not be playing with real money in development.See the recaptcha documentation. You WILL regret skipping this step. Fraudsters routinely use legitimate sites to test stolen cards in bulk.
Add this line to the template of your choice where you want the form to appear
{{ aposDonationForm() }}
apostrophe-donate
comes with a lot of pre-baked things.
apostrophe-schemas
's schemaMacros
. You can redefine the schema in index.js
.Pre-baked styles in content.less
and a spinner.gif
for backward compatible ui goodness
FAQs
Donate module for Apostrophe CMS
We found that apostrophe-donate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.