Page MenuHomePhabricator

Add Merchants to Phortune
ClosedPublic

Authored by epriestley on Oct 6 2014, 11:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 1:07 AM
Unknown Object (File)
Thu, Apr 4, 7:46 AM
Unknown Object (File)
Thu, Apr 4, 7:46 AM
Unknown Object (File)
Thu, Apr 4, 7:44 AM
Unknown Object (File)
Thu, Apr 4, 7:27 AM
Unknown Object (File)
Sun, Mar 31, 10:34 AM
Unknown Object (File)
Mar 11 2024, 4:42 AM
Unknown Object (File)
Feb 19 2024, 3:12 AM
Subscribers

Details

Summary

Ref T2787. Currently, you add payment providers (Stripe, Paypal, etc) in global configuration.

Generally, this approach is cumbersome, limiting, and often hard for users to figure out. It also doesn't provide a natural way to segment payment receivers or provide web access to administrative payment functions like issuing refunds, canceling orders, etc. I think that stuff definitely needs to be in the web UI, and the rule for access to it can't reasonably just be "all administrators" in a lot of reasonable cases.

The only real advantage is that it prevents an attacker from adjusting settings and pointing something at an account they control. But this attack can be mitigated through notifications, some sort of CLI-only merchant lock, payment accounts being relatively identifiable, etc.

So introduce "merchants", which are basically payable entities. An individual merchant will have attached Paypal, Stripe, etc., accounts, and access rules. When you buy something in an application, the merchant to pay is also specified. They also provide an umbrella for dealing with permissions down the line.

This may get a little cumbersome because if there are several merchants your saved card information is not shared across them. I think that will be fine in the normal case (most installs will have only one merchant). Even if it isn't and we leave providers global, I think introducing this is the right call from a web UI / permissions point of view. I'll play around with it in the next couple of diffs and figure out exactly where the line goes.

Test Plan

Listed, created, edited, viewed merchants.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Add Merchants to Phortune.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Oct 7 2014, 5:35 PM
This revision was automatically updated to reflect the committed changes.