* add new route for card update
* create backend route
* update label
* basic functionality working
* ran rubocop
* added rspec tests for functionality
* make payment_method param compulsory
* fixed js linting
* improve client side error handling
* improve server side error handling
* improved update card page UI
* improve button UI for user subscriptions page
* give feedback to user about save status
* remove heading from last column
* fix padding on edit/delete buttons for update table
Co-authored-by: Blake Erickson <o.blakeerickson@gmail.com>
* FIX: set Discourse consistent styles on Stripe card element
* use correct placeholder color
* applied prettier
* mock update method for cardElement
* minor formatting
The import script has a prompt asking if this is a "procourse" import or
not, but the logic for handling the answer is backwards and will
incorrectly set the `procourse_import` flag to `true`.
This commit also fixes a minor typo.
Duplicate payments were showing up in the discourse ui for users. Actual
transactions in stripe were not being duplicated. This fix ensures that
when parsing the api response we don't append any duplicates. Added a
duplicate entry to the specs to test for this.
I do think there can be some improvements made to this controller
endpoint, but I'd like to save those for a different and larger PR and
just get this fix out first.
We need to use the `html-safe` helper here so to that the html tags in
the translation template are rendered correctly.
See: https://meta.discourse.org/t/211376
* FIX: Include one-time purchases in campaign total
On the subscription banner that shows on the top of the forum it shows
the total amount raised toward a goal. But the amount shown was not
including one-time purchases. It was only showing subscriptions.
This change updates the sync with stripe logic so that it also includes
one-time purchases.
See: https://meta.discourse.org/t/-/209591
* rubocop: remove extra blank line
`.dig` isn't valid for stripe objects. This commit fixes this 500 error
you get when trying to edit a pricing plan:
```
NoMethodError (undefined method `dig' for #<Stripe::Price:0x....)
```
The interval field was missing in the Ember object since it was only available inside the nested object.
Co-authored-by: Jarek Radosz <jradosz@gmail.com>