HomePhabricator

Add initial cut of PayPal and pay-once-at-checkout providers to Phortune

Description

Add initial cut of PayPal and pay-once-at-checkout providers to Phortune

Summary:
Paypal doesn't let us capture cards in a PCI-free way like Stripe and Balanced do, but we can provide a "pay with paypal" option at checkout. (For subscriptions, we'll have to invoice monthly to retain control over billing, but this doesn't seem wildly unreasonable.) The bitcoin provider MtGox works in a similar way, as do some other providers we might some day want to implement.

This adds:

  • Hooks to providers so they can offer "pay once at checkout" workflows.
  • Hooks so providers can have controllers, for redirect-based third-party workflows.
  • Basic Paypal integration using the "Express Checkout Merchant API", which seems like the best fit for our use case. This only goes as far as shoving the user through the payment flow; we don't actually capture payments yet (paypal has around 35 different APIs, but this one seems to be the only PCI-free one which wouldn't give users an awful experience).

This diff is fairly checkpointey, but Phortune doesn't really bill anything yet anyway. Ref T2787.

Test Plan: Ran through Paypal sandbox workflow; "paid" for stuff.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5834

Details

Provenance
epriestleyAuthored on
Reviewer
btrahan
Differential Revision
Restricted Differential Revision
Parents
rP67459092d7c9: Expand comments on page load only when the anchor points into them
Branches
Unknown
Tags
Unknown
Tasks
T2787: Build Phortune into a real accounts/billing application

Event Timeline