Easy node.js integration for Dwolla's MassPay API.
Based on the Dwolla Labs MassPay API which has two endpoints: Create Job and Job Details by ID. This module provides simple access to the two endpoints above, as well as an additional monitor timer that will poll the Job Details by ID endpoint on a specified interval until the job is complete, or a specified timeout reached.
var config =token: processenvDWOLLA_OAUTH_TOKEN || null // Requiredpin: processenvDWOLLA_PIN || null // Requireduid: processenvDWOLLA_UID || null // Requiredmonitor_interval_ms: 500 // Optional (default 1000): how often to poll the job details endpointmonitor_timeout_ms: 0 // Optional (default 0): when to timeout, or 0 == never time outvar masspay = config;// NOTE: you must define email, filedata, assumeCosts, test, source, user_job_id in your codemasspay;
This executes a single integration test that covers all three API functions exposed by this module. It creates a Mass Pay job with Dwolla (in test mode), then starts a monitor timer that calls the job details endpoint on Dwolla to check job status until timeout. Mass Pay jobs created on Dwolla in test mode do not complete, so it is expected for this job to timeout. Testing is in Mocha with Should.js.
This module is MIT licensed here.