Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PayPal Pro Payments #528

Draft
wants to merge 11 commits into
base: the-future
Choose a base branch
from
Draft

PayPal Pro Payments #528

wants to merge 11 commits into from

Conversation

NuckChorris
Copy link
Member

@NuckChorris NuckChorris commented Mar 24, 2019

What

Allow Users to subscribe to PRO or PATRON via PayPal.

Added paypal-sdk-rest ~> 1 (the v2 isn't matured yet) to handle PayPal API.

PayPal Subscription Agreement Approval Flow

  1. Create Agreement, get token
  2. Send token to client, which launches the PayPal checkout with it
  3. After PayPal checkout, client notifies server to "execute" the agreement. At this point, the user is given a ProSubscription.

PayPal Webhooks

When a payment is completed, PayPal notifies us via a webhook.

Why

Didn't get approved for Braintree, so we need to use raw PayPal. PayPal has numerous systems for creating a subscription but this one appears to be the most modern.

Checklist

  • All files pass Rubocop
  • Any complex logic is commented
  • Any new systems have thorough documentation
  • Any user-facing changes are behind a feature flag (or: explain why they can't be)
  • All the tests pass
  • Tests have been added to cover the new code

TODO

  • Webhook Handler
  • GraphQL Mutations

@@ -0,0 +1,8 @@
require 'paypal-sdk-rest'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of this source file (paypal-sdk-rest.rb) should use snake_case. (https://github.com/bbatsov/ruby-style-guide#snake-case-files)

@NuckChorris NuckChorris self-assigned this May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants