-
Notifications
You must be signed in to change notification settings - Fork 815
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
Recurring Payments Block: Minimum transaction amounts #14802
Conversation
This is an automated check which relies on |
|
||
/** | ||
* Returns the minimum transaction amount for the given currency. If currency is not one of the | ||
* known types it returns ... |
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.
@artpi Should we default to a value if the currency is not one of the known options? This shouldn't happen in practice.
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.
The currency list gets populated from these constants above. So that should not be happening and we don't want want fallbacks - we want errors in this case :)
8d324ef
to
d943f12
Compare
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.
My comments are not huge blockers
|
||
/** | ||
* Returns the minimum transaction amount for the given currency. If currency is not one of the | ||
* known types it returns ... |
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.
The currency list gets populated from these constants above. So that should not be happening and we don't want want fallbacks - we want errors in this case :)
346cb8f
to
e91674e
Compare
Caution: This PR has changes that must be merged to WordPress.com |
Recurring Payments Block: Minimum transaction amounts Uses Stripe's minimum transaction amounts per currency. - Sets the input minimum value to 0 to allow for better stepper experience - Prevents using less than minimum amount during component state change
e91674e
to
cd7f368
Compare
beaucollins, Your synced wpcom patch D39465-code has been updated. |
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.
beaucollins, Your synced wpcom patch D39465-code has been updated. |
@artpi can you chime in about the question:
|
Oooh, nice catch @kraftbj There is no migration path because they are plainly not working. If you add a MX$5 , the transaction will fail during checkout, with an error that is confusing to the user. There are 2 users with plans in MXN<10 and 4 users with plans in JPY that have this issue. @beaucollins To make sure everything is proper in the block, let's filter out the invalid subscriptions (make them impossible to select) We will not deal with those 6 users. Their subscriptions are not working anyway, by definition these plans have no subscribers, so they can retry and create a new plan. |
Making invalid plans impossible to select and not providing a fix for those six is reasonable to me. If you could Slack me those users or how to pull that list, I'm happy to reach out to them proactively to let them know they need to amend their subscriptions. That'd be a nice priority support outreach. |
beaucollins, Your synced wpcom patch D39465-code has been updated. |
…minimum-transaction
beaucollins, Your synced wpcom patch D39465-code has been updated. |
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.
Thanks for the updates! Let's do this.
Hey @beaucollins I merged something and suspect you will have to:
|
…minimum-transaction
beaucollins, Your synced wpcom patch D39465-code has been updated. |
1 similar comment
beaucollins, Your synced wpcom patch D39465-code has been updated. |
D39465 is deployed. |
* Initial changelog entry * Changelog: add #14904 * Changelog: add #14910 * Changelog: add #14913 * Changelog: add #14916 * Changelog: add #14922 * Changelog: add #14924 * Changelog: add #14925 * Changelog: add #14928 * Changelog: add #14840 * Changelog: add #14841 * Changelog: add #14842 * Changelog: add #14826 * Changelog: add #14835 * Changelog: add #14859 * Changelog: add #14884 * Changelog: add #14888 * Changelog: add #14817 * Changelog: add #14814 * Changelog: add #14819 * Changelog;: add #14797 * Changelog: add #14798 * Changelog: add #14802 * Changelog: add #13676 * Changelog: add #13744 * Changelog: add #13777 * Changelog: add #14446 * Changelog: add #14739 * Changelog: add #14770 * Changelog: add #14784 * Changelog: add #14897 * Changelog: add #14898 * Changelog: add #14968 * Changelog: add #14985 * Changelog: add #15044 * Changelog: add #15052 * Update to remove Podcast since it remains in Beta * Changelog: add #14803 * Changelog: add #15028 * Changelog: add #15065 * Changelog:add #14886 * Changelog: add #15118 * Changelog: add #14990 * Changelog: add #14528 * Changelog: add #15120 * Changelog: add #15126 * Changelog: add #15049 * Chanegelog: add #14852 * Changelog: add #15090 * Changelog: add #15138 * Changelog: add #15124 * Changelog:add #15055 * Changelog: add #15017 * Changelog: add #15109 * Changelog: add #15145 * Changelog:add #15096 * Changelog:add #15153 * Changelog: add #15133 * Changelog: add #14960 * Changelog: add #15127 * Changelog: add #15056 * Copy current changelog to changelog archive. * Clarify changelog description
Uses Stripe's minimum transaction amounts per currency.
Changes proposed in this Pull Request:
The placeholder text uses
formatCurrency
which is nice, however it somewhat misleads the user into thinking they can type the currency symbols into the field while we actually only allow that which can be parsed byparseFloat
which means values like$0.50
orCHF 0,50
are not considered valid. Should we allow this kind of input?Testing instructions:
This assumes the "Recurring Payments Block" is available to your Jetpack plan for the site you are testing.
Setup
/recurr
select "Recurring Payments button"Test
Clear out the "price" value, the placeholder should show the minimum price

Change the currency, if the price is now too low for the given currency, it should show the error (e.g. start with

USD
and0.5
and change toMXN
)Proposed changelog entry for your changes: