-
Notifications
You must be signed in to change notification settings - Fork 15
Adds handling of recurring payment #914
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
Open
kmmatwork
wants to merge
55
commits into
develop
Choose a base branch
from
feature/payment-recurring
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
276cd84
Adds customer.subscription.updated event to list of subscribed to Str…
70c504a
Adds handling of Stripe events related to subscription renewal
da10988
Adds client API for reattemptng the renewal of a subscription that
dceb366
Adds acceptance tests for recurring payment
e4bc0da
Merge branch 'develop' into feature/payment-recurring
ebf5bd5
Merge branch 'develop' into feature/payment-recurring
7034e7e
Merge branch 'develop' into feature/payment-recurring
5e6a6ed
Merge branch 'develop' into feature/payment-recurring
e4c3038
Renames data class 'SubscriptionStateInfo' to 'SubscriptionPaymentInfo'
3443ba5
Moves 'subscription' tag from product 'product-class' to product 'pay…
c0b1601
Minor fixes and clarifications
2c5231c
Merge branch 'develop' into feature/payment-recurring
6aef3b0
Merge branch 'develop' into feature/payment-recurring
90d5ae7
Renames functions related to payment subscriptions in order to
af8c633
Switch from ngrok.io to serveo.net for supporting webhook in acceptan…
3570590
Merge branch 'develop' into feature/payment-recurring
2e6ba10
Merge remote-tracking branch 'origin/feature/payment-recurring' into …
7ee9cbc
Merge branch 'develop' into feature/payment-recurring
5d2f1d4
Merge branch 'develop' into feature/payment-recurring
cec7894
Make check of STRIPE_ENDPOINT_SECRET variable more explisit in condit…
9ac190c
Switch from serveo.net to stripe-cli Docker image for supporting webh…
bee078d
Merge branch 'develop' into feature/payment-recurring
23d539e
Adds documentation for test setup ot the recurring payment acceptance…
1cd7024
Disable the recurring payment acceptance tests
34877e2
Merge branch 'develop' into feature/payment-recurring
6373e07
Adds fixes for using Stripe CLI as proxy for Stripe events
99e98c3
Adds missing Stripe proxy Dockerfile files
84f2c6a
Adds fixes to test setup using Stripe proxy
f0be5a0
Merge branch 'develop' into feature/payment-recurring
fd92961
Merge branch 'develop' into feature/payment-recurring
46b0e8e
Merge branch 'develop' into feature/payment-recurring
cadd83c
Merge branch 'develop' into feature/payment-recurring
b9a74c4
Merge branch 'develop' into feature/payment-recurring
cfb0ad9
Merge branch 'develop' into feature/payment-recurring
9475579
Merge branch 'develop' into feature/payment-recurring
07ab623
Merge branch 'develop' into feature/payment-recurring
bcff504
Merge branch 'develop' into feature/payment-recurring
c6a2c48
Merge branch 'develop' into feature/payment-recurring
902a477
Merge branch 'develop' into feature/payment-recurring
6ca644d
Fixes overlooked incorrect class name from last manual merge with dev…
85aa0c6
Merge branch 'develop' into feature/payment-recurring
c28c812
Merge branch 'develop' into feature/payment-recurring
aa5009c
Merge branch 'develop' into feature/payment-recurring
35de8b1
Merge branch 'develop' into feature/payment-recurring
41e499f
Merge branch 'develop' into feature/payment-recurring
514c3cc
Merge branch 'develop' into feature/payment-recurring
bb0989d
Merge branch 'develop' into feature/payment-recurring
2a6d2d3
Merge branch 'develop' into feature/payment-recurring
44b99bf
Fixes after last merge with develop
79b24d9
Adds 'us' as the third region to acceptance tests as it is used
266943d
Merge branch 'develop' into feature/payment-recurring
6defbb0
Merge branch 'develop' into feature/payment-recurring
32d21bd
Merge branch 'develop' into feature/payment-recurring
e30cee3
Merge branch 'develop' into feature/payment-recurring
2e1dd56
Merge branch 'develop' into feature/payment-recurring
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| FROM stripe/stripe-cli | ||
|
|
||
| LABEL maintainer="[email protected]" | ||
|
|
||
| COPY script/stripe-proxy.sh /proxy.sh | ||
|
|
||
| ENTRYPOINT [] | ||
|
|
||
| CMD ["/proxy.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #! /bin/sh | ||
|
|
||
| # Only start the Stripe CLI tool in proxy forward mode | ||
| # if the STRIPE_ENDPOINT_SECRET environmentvariable is | ||
| # set to what looks like an actual secret. | ||
| # | ||
| # If not set, block until stopped by SIGTERM or similar. | ||
|
|
||
| echo $STRIPE_ENDPOINT_SECRET | grep -q ^whsec_ | ||
|
|
||
| if [ $? -eq 0 ] | ||
| then | ||
| echo Starting Stripe CLI in proxy forward mode... | ||
| stripe listen \ | ||
| --forward-to prime:8080/stripe/event \ | ||
| --events customer.subscription.updated,invoice.created,invoice.payment_succeeded,invoice.upcoming | ||
| else | ||
| echo Not starting Stripe CLI. | ||
| sleep 2147483647 # block for 2^31-1 seconds | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so much repeated code that it now arguably would make sense to factor this out into a function. Or not. Your call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try to move the
curlcall into a function.