Philipp Winkler
6291e3c587
Handle invalid referer for embedded page service
2022-07-11 22:07:00 +02:00
Jean-Baptiste Bellet
c39b00b6c2
do not set on_demand and on_hand if variant has errors
...
+ update specs
Co-Authored-By: Maikel <maikel@email.org.au >
2022-07-06 10:46:54 +02:00
Maikel Linke
b7efa1b018
Replace Paperclip on Spree::Image
2022-06-01 17:16:55 +10:00
Maikel Linke
4a0ed99919
Replace Paperclip on Enterprise model
...
We configured Paperclip to convert images to JPG in some cases but I
omitted that here because we don't need it. If an image is better
represented as PNG or another format then the user should be able to
choose that.
Some specs were also testing the generated URL but the Active Storage
URL doesn't contain a style name anymore and it's not helpful to test
the URL.
2022-06-01 17:16:55 +10:00
Jean-Baptiste Bellet
96f267eefe
Create specs for filtering by properties when sorting is available
...
+ update product, supplier, taxon name to be more precise
2022-04-21 11:03:22 +02:00
Jean-Baptiste Bellet
405b7e6e17
Handle tax rates for ShippingMethod
...
Co-Authored-By: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com >
2022-02-15 15:16:58 +01:00
Matt-Yorkley
31e6405125
Handle setting of payment amount during checkout in OrderUpdater
2022-02-01 11:39:07 +00:00
Filipe
75395f6f29
Merge pull request #8648 from Matt-Yorkley/csp
...
Configure CSP
2022-01-26 19:55:11 +00:00
Filipe
374c05116b
Merge pull request #8726 from Matt-Yorkley/stringex-machina
...
Reduce impact of stringex gem
2022-01-26 19:02:41 +00:00
Matt-Yorkley
8552da2377
Extract and stub PaymentMethodFetcher
2022-01-24 20:28:59 +00:00
Matt-Yorkley
dfbd384c95
Refactor embedding to a Concern
2022-01-18 12:22:06 +00:00
Matt-Yorkley
3bfea510b2
Update spec/services/url_generator_spec.rb
...
Co-authored-by: Maikel <maikel@email.org.au >
2022-01-18 08:45:46 +00:00
Matt-Yorkley
0ef35b319c
Create UrlGenerator service
2022-01-15 13:21:09 +00:00
Matt-Yorkley
02995530e2
Pull apart OrderCompletionReset service
2022-01-14 19:41:08 +00:00
Matt-Yorkley
67b8a55273
Separate OrderCompletionReset from Checkout::PostCheckoutActions and don't pass controller objects to Checkout::PostCheckoutActions
...
We need to separate some of these bits to make them easier to call in different contexts. Also there's some weird stuff happening here with the controller being passed in to the service, and it seems like a code smell to me...
2022-01-14 19:41:08 +00:00
Filipe
da703b2d95
Merge pull request #8615 from jibees/8559-enable-sort-orders-by-order-full-name
...
Enable sorting orders by order full name
2022-01-11 11:27:36 +00:00
Filipe
750411fd15
Merge pull request #8592 from openfoodfoundation/gateway-redirects
...
Refactor payment gateway redirects handling
2021-12-23 21:35:45 +00:00
Cillian O'Ruanaidh
84eaafb822
Add a :captured_at column on payments to store when they are captured
...
Fixes #8611 .
2021-12-17 14:45:47 +00:00
Matt-Yorkley
45beefc533
Keep the order of passed argument
...
Do not retrieve the orders list sorted by completed_at but by the order_ids array itself
Add BulkInvoiceJob spec and cover sorting behaviour
2021-12-16 09:33:38 +01:00
Matt-Yorkley
ef7a02004e
Update specs
2021-12-15 21:20:58 +00:00
Matt-Yorkley
cf5d964133
Update usages of old preference getters and setters
2021-11-04 11:48:30 +00:00
PHAN QUANG LAM
77524c633d
Fix menu indicator on bulk order page
2021-10-26 06:41:30 +09:00
Jean-Baptiste Bellet
e82e93e1cc
Update test to add more case with finalized order with no line items
...
Those empty order but finalized must be returned by the API
2021-09-23 11:06:58 +02:00
Maikel
02a10ede15
Merge pull request #7938 from dacook/product-image-import
...
Add script to import product images from URL
2021-09-20 16:57:23 +10:00
Andy Brett
069cb043ee
Merge pull request #8148 from jibees/5236-remove-incomplete-orders-from-admin-interface-2
...
Only shows order that actually have at least one line_item V2
2021-09-09 16:49:30 -07:00
Andy Brett
f8486bcbf8
Merge pull request #7769 from Matt-Yorkley/payment-status-checking
...
Stripe: payment status debugging
2021-09-08 15:21:38 -07:00
Matt-Yorkley
b53371d870
Fix not_empty scope
2021-09-08 12:14:53 +01:00
Jean-Baptiste Bellet
7656f5d20f
Add an order with no line_items, should not be returned by API
2021-09-08 10:44:04 +02:00
Jean-Baptiste Bellet
9c86adf0f4
Add line_items to each orders
...
Now, API returns only orders with line_items: add to each in specs.
2021-09-08 10:43:59 +02:00
Matt-Yorkley
886e03af2f
Merge pull request #7805 from Matt-Yorkley/adjustments-admin
...
[Adjustments] Admin adjustments
2021-07-27 12:23:29 +02:00
Matt-Yorkley
6daa37a5c0
Ensure TaxRateFinder returns an array if the given adjustment has no tax
2021-07-25 22:47:40 +01:00
David Cook
c156d0c2e6
Add script to import product images from URL
...
With new ImageImporter.
Co-authored-by: Maikel <maikel@email.org.au >
2021-07-16 11:36:49 +10:00
Andy Brett
a58e0fe217
Merge pull request #7926 from luisramos0/rubocop_fix
...
Update Rubocop todo files
2021-07-14 10:05:54 -07:00
Luis Ramos
01fe6abeed
Result of rubocop -a, safe autocorrect
2021-07-13 22:38:05 +01:00
Matt-Yorkley
200dde18e8
Update admin adjustment taxes in OrderAdjustmentsFetcher spec
2021-07-09 21:49:36 +01:00
Matt-Yorkley
0876f2ae0d
Remove tax rate guessing from TaxRateFinder
...
🎉
2021-07-09 21:49:36 +01:00
Matt-Yorkley
32a2610e7d
Refactor arguments for PaymentIntentValidator
2021-07-09 13:42:41 +01:00
Matt-Yorkley
e1846b1030
Extract Stripe payment helper methods to a service
2021-07-09 13:42:40 +01:00
Matt-Yorkley
e5a85caef6
Refactor Stripe::PaymentIntentValidator
...
This makes the interface a lot simpler and moves the fetching of the information it requires inside the service itself.
2021-07-09 13:39:52 +01:00
Andy Brett
46cd05c54a
Merge pull request #7712 from guidoDutra/1861-enable-shopfront-sorting-by-producer
...
Enable sorting by producer in shopfront
2021-07-06 09:27:42 -07:00
Andy Brett
9b1da14380
mark payment failed after failed authorization
2021-06-29 11:54:51 -07:00
Pau Perez
1f3560e964
Pass in the order when it's already initialized
...
At `CapQuantity`'s instantiation time the proxy's order is not yet
initialized, and so `CapQuantity` was checking against nil all the time.
This went unnoticed because the job's specs were not integration-level
tests and were stubbing way too many things.
2021-06-23 13:47:42 +02:00
Pau Perez
648023750b
Move tests exercising the service to its spec file
...
These are bypassing the job to only test the service, so there's no
point on doing that. They can test the service alone.
2021-06-23 13:45:43 +02:00
Pau Perez
475474b179
Replace order reloads with association set up
2021-06-21 10:30:12 +02:00
Pau Perez
073c4bc1ae
Reload order so line items are visible in spec
2021-06-21 10:30:12 +02:00
Pau Perez
e052f36cc6
Rubocop -a
2021-06-21 10:30:12 +02:00
Pau Perez
827faef690
Fix call to #record_and_log_error
2021-06-21 10:30:12 +02:00
Pau Perez
b69aeae892
Rename PlaceOrder to PlaceProxyOrder
...
As discussed in
https://github.com/openfoodfoundation/openfoodnetwork/pull/7281#discussion_r650183813 .
2021-06-21 10:30:12 +02:00
Pau Perez
f92ca964db
Improve service name
...
As discussed in
https://github.com/openfoodfoundation/openfoodnetwork/pull/7281#discussion_r650069982 .
2021-06-21 10:30:12 +02:00
Pau Perez
f61cdb6608
Extract CapQuantityAndStoreChanges service
...
This is a responsiblity of its own that makes the job's tests really
complex.
2021-06-21 09:49:07 +02:00