Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.83 KB

README.md

File metadata and controls

48 lines (33 loc) · 1.83 KB

SAS Azure Functions

Squamish Access Society

Advocating for responsible stewardship of the cliffs and crags in the greater Squamish Area.
Traditional territory of the Sḵwx̱wú7mesh Úxwumixw.


This repository contains the source code for Azure Functions handling various needs for the Squamish Access Society.

Current functions:

  • Paypal-IPN: Sign-up payment from PayPal IPNs.
  • Membership-Check: Membership check by email.

Repository layout

This is a Rust project. To build, run cargo build. If you do not have the rust compiler available, install it with rustup.

The actual PayPal IPN handler is in src/ipn_handler.rs. Everything else is server setup / azure function compatibility.

The code is formatted using cargo fmt. Install via cargo install rustfmt.

The following environment variables are accepted (or in .env):

  • MAILCHIMP_API_KEY (required)
  • MAILCHIMP_LIST_ID (required)
  • TWILIO_API_KEY (required)
  • TEMPLATE_MEMBERSHIP_CHECK (required)
    • The id of the membership check twilio email template.
  • TEMPLATE_MEMBERSHIP_NOTFOUND (required)
    • The id of the membership not found twilio email template.
  • PAYPAL_SANDBOX (optional, for testing)
  • RUST_BACKTRACE (optional, for backtraces)

Deploying

Currently only set up to deploy to a windows environment. Must be built with a x86_64-pc-windows Rust toolchain.

  • cargo build --release
  • cp target\release\squamishaccess-functions.exe bin\squamishaccess-functions.exe
  • deploy via Azure Core Tools v3 / VS Code extension

License

Licensed under the BlueOak Model License 1.0.0Contributions via DCO 1.1