Skip to content

PayPal Pro Payments#528

Draft
NuckChorris wants to merge 11 commits into
the-futurefrom
feature/pro-paypal
Draft

PayPal Pro Payments#528
NuckChorris wants to merge 11 commits into
the-futurefrom
feature/pro-paypal

Conversation

@NuckChorris

@NuckChorris NuckChorris commented Mar 24, 2019

Copy link
Copy Markdown
Member

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'

Copy link
Copy Markdown

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