Matt-Yorkley
8429da3d2a
Remove unused argument from ProcessPaymentIntent
2021-05-16 22:19:01 +01:00
Matt-Yorkley
381b0e78d5
Improve ProcessPaymentIntent specs
2021-05-16 20:14:14 +01:00
Matt-Yorkley
2e63cd8116
Add explanatory comment on payment processing flow
2021-05-16 20:11:45 +01:00
Matt-Yorkley
52e0d84238
Reload in-memory payment before checking it's new state
...
The state should have changed in the database if the payment was processed successfully, and the memoized version here will not know that without a reload.
2021-05-16 20:11:45 +01:00
Matt-Yorkley
5725535715
Fix payment state checking
2021-05-16 20:11:45 +01:00
Matt-Yorkley
05ed98aa0c
Use :order_with_totals in ProcessPaymentIntent
...
If we just use the :order factory here, it has no line items and no total, which means when we try to push it into complete state, the #requires_payment? check fails because the order total is zero, which means the call to #process_payments is ignored
2021-05-16 20:11:45 +01:00
Matt-Yorkley
fd021d4778
Refactor payment intent status checking and return "ok" if the payment has already been processed successfully in a previous request
...
If the page is reloaded after the payment has already gone through, we can skip the processing and give a non-error response; the payment is already completed and Stripe's response confirms it was successful.
2021-05-16 20:11:45 +01:00
Matt-Yorkley
2b9f9fce86
Fix flash session memory-effect when showing errors after payment processing
...
We're not doing a redirect after setting this flash message, so we need to ensure it's discarded after the current page load.
2021-05-16 20:11:45 +01:00
Matt-Yorkley
81aac442f2
Improve conditional in raise_if_not_in_capture_state
2021-05-16 20:11:45 +01:00
Matt-Yorkley
16e3af9b49
Update OrderController spec
2021-05-16 20:11:45 +01:00
Matt-Yorkley
227bdd7d4c
Update ProcessPaymentIntent spec
2021-05-16 12:55:48 +01:00
Matt-Yorkley
471a7903f6
Update PaymentIntentValidator spec
2021-05-16 12:19:04 +01:00
Matt-Yorkley
37177e7207
Add test coverage to StripeSCA spec
2021-05-16 12:19:04 +01:00
Matt-Yorkley
5805104d13
Tidy up controller and add explanatory comment
2021-05-16 12:19:04 +01:00
Matt-Yorkley
e686a4f627
Move raising of errors when payment intent state != "requires_capture" out of PaymentIntentValidator service
...
When we're fetching the payment intent via PaymentIntentValidator in StripeSCA#purhcase (to capture it), we want it to fail loudly if it's not in "requires_capture" state. We're now also re-using the same PaymentIntentValidator service to check if payment processing was *successful*, in which case we need it *not* to fail loudly if the state == "succeeded", eg != "requires_capture".
2021-05-16 12:19:04 +01:00
Maikel Linke
cea3ee4ef9
Transifex updates
2021-05-14 10:06:31 +10:00
Andy Brett
ebdbfe0027
Merge pull request #7639 from drummer83/patch-1
...
Remove Ruby version from WIKI
2021-05-13 13:26:34 -07:00
Konrad
b680697af6
Remove Ruby version
...
Let's remove the Ruby version from the text. It changes regularly and have the link where to find it right behind it.
2021-05-13 21:16:02 +02:00
Matt-Yorkley
2e248744c0
Merge pull request #7520 from Matt-Yorkley/shipment-controller
...
Shipment controller: test coverage and improvements
2021-05-13 20:26:51 +02:00
Matt-Yorkley
4932e1dcb5
Merge pull request #7628 from viktorsmari/remove-distributer-sample-data
...
Remove distributer from sample_data
2021-05-12 23:53:13 +02:00
Viktor Smari
536281ec80
Remove distributer from sample_data
...
Closes #7625
2021-05-12 23:01:08 +02:00
Matt-Yorkley
99cf23df26
Merge pull request #7530 from Matt-Yorkley/email-after-commit
...
Email after commit
2021-05-12 21:22:55 +02:00
Matt-Yorkley
f49d4592a0
Merge pull request #7506 from guidoDutra/5546-prevent-deleting-only-item-in-confirmed-order
...
prevent deleting only item in confirmed order
2021-05-12 21:10:09 +02:00
Pau Pérez Fabregat
7f27544acb
Merge pull request #7612 from openfoodfoundation/dependabot/bundler/actionpack-action_caching-1.2.2
...
Bump actionpack-action_caching from 1.2.1 to 1.2.2
2021-05-12 16:24:25 +02:00
Pau Pérez Fabregat
2aac44d95e
Merge pull request #7620 from openfoodfoundation/transifex
...
Transifex
2021-05-12 15:50:25 +02:00
Pau Pérez Fabregat
8f921b8b08
Merge pull request #7593 from viktorsmari/add-bullet-footer
...
Add bullet footer
2021-05-12 15:47:54 +02:00
Transifex-Openfoodnetwork
dfe485b079
Updating translations for config/locales/ru.yml
2021-05-12 17:49:31 +10:00
Matt-Yorkley
e60a513c88
Merge pull request #7571 from coopdevs/make-specs-accurate
...
Properly mock validator and extend tests
2021-05-11 22:24:01 +02:00
Pau Pérez Fabregat
1f8e731594
Merge pull request #7596 from openfoodfoundation/transifex
...
Transifex
2021-05-11 11:56:35 +02:00
dependabot[bot]
d69ef31bf9
Bump actionpack-action_caching from 1.2.1 to 1.2.2
...
Bumps [actionpack-action_caching](https://github.com/rails/actionpack-action_caching ) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/rails/actionpack-action_caching/releases )
- [Changelog](https://github.com/rails/actionpack-action_caching/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rails/actionpack-action_caching/compare/v1.2.1...v1.2.2 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-11 05:05:32 +00:00
Andy Brett
9ae7c5efbc
Merge pull request #7578 from psychoslave/master
...
Update things related to some package manager influencing setup process
2021-05-10 17:01:46 -07:00
Matt-Yorkley
902bbf7dc4
Merge pull request #7576 from Matt-Yorkley/bulk-line-items
...
Add test coverage to BulkLineItemsController actions
2021-05-11 01:47:17 +02:00
Andy Brett
d29ef0d7b1
Merge branch 'master' into make-specs-accurate
2021-05-10 16:10:33 -07:00
Andy Brett
d2a3d9049f
Merge pull request #7588 from andrewpbrett/enterprise-permalink-spec
...
[Rails 6.0] Fix enterprise permalink spec
2021-05-10 15:30:45 -07:00
Matt-Yorkley
85b8e9b51f
Merge pull request #7595 from openfoodfoundation/dependabot/bundler/factory_bot_rails-6.2.0
...
Bump factory_bot_rails from 6.1.0 to 6.2.0
2021-05-10 19:55:54 +02:00
Andy Brett
3239c893ba
Merge pull request #7590 from viktorsmari/ransack-search-deprecation
...
Ransack.search is deprecated. Use .ransack instead
2021-05-10 08:43:09 -07:00
Andy Brett
17a0063b40
Merge pull request #7402 from filipefurtad0/products_spec_add_ons
...
Adds coverage for product deletion and cloning
2021-05-10 06:26:11 -07:00
Transifex-Openfoodnetwork
75dc7af0ed
Updating translations for config/locales/en_GB.yml
2021-05-10 18:16:04 +10:00
dependabot[bot]
cb15e28cef
Bump factory_bot_rails from 6.1.0 to 6.2.0
...
Bumps [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails ) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/thoughtbot/factory_bot_rails/releases )
- [Changelog](https://github.com/thoughtbot/factory_bot_rails/blob/master/NEWS.md )
- [Commits](https://github.com/thoughtbot/factory_bot_rails/compare/v6.1.0...v6.2.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-05-10 05:55:18 +00:00
Andy Brett
cbefa5f882
Merge pull request #7589 from andrewpbrett/order-adjustments-spec
...
[Rails 6.0] Fix order adjustments spec
2021-05-09 10:38:19 -07:00
Andy Brett
231f01dad2
fix order adjustments spec
2021-05-09 10:09:22 -07:00
Viktor Smari
c14ccdc21c
Add bullet footer
...
Left corner of the page will show the bullet warnings
2021-05-09 16:49:00 +02:00
Andy Brett
a0476be2c9
Merge pull request #7568 from andrewpbrett/stripe-mock-js
...
[Rails 6.0] Use raw to render stripe mock js file
2021-05-08 17:46:24 -07:00
Matt-Yorkley
24a5407c8f
Merge pull request #7565 from luisramos0/rails6_success
...
[Rails 6.0] Replace be_success on test_response with status 200
2021-05-09 02:33:49 +02:00
Andy Brett
66da72ccc2
use raw to render stripe mock js
2021-05-08 17:29:38 -07:00
Viktor Smari
6a342ae368
Ransack.search is deprecated. Use .ransack instead
...
https://github.com/activerecord-hackery/ransack/pull/975
2021-05-09 01:05:37 +02:00
Andy Brett
dd851edbdc
fix enterprise permalink spec
2021-05-08 14:21:45 -07:00
Andy Brett
2910cbf15c
Merge pull request #7582 from openfoodfoundation/transifex
...
Transifex
v3.7.0
2021-05-08 13:55:11 -07:00
Transifex-Openfoodnetwork
d24d7fce56
Updating translations for config/locales/de_DE.yml
2021-05-09 05:16:39 +10:00
Mathieu Lovato Stumpf Guntz
a4d6e69309
Replace nmp with yarn, remove newrelic
2021-05-07 21:10:55 +02:00