Filipe
067f90b17c
Merge pull request #8712 from Matt-Yorkley/oc-mails
...
OC notifications
2022-01-17 20:30:40 +00:00
Filipe
8114eb1c9f
Merge pull request #8666 from openfoodfoundation/stripe-controller
...
Extract new StripeController
2022-01-17 20:21:40 +00:00
Filipe
62f0de75ee
Merge pull request #8679 from Matt-Yorkley/drop-jquery-ujs
...
Drop jquery_ujs
2022-01-17 16:30:25 +00:00
filipefurtad0
e7aa19c95d
Fixes translation/rendering inconsistency on Country label(step 3)
2022-01-15 19:43:57 +00:00
Matt-Yorkley
c209be9c17
Clarify params
...
Spree::Order.to_param outputs the order *number* (not the id) when used to build URLs. This makes it a bit more explicit.
2022-01-14 19:41:08 +00:00
Matt-Yorkley
12f7fc98fa
Move payment authorization to StripeController
...
This Stripe-payment-authorizing logic is used by backoffice and subscriptions orders (but not the checkout), and was previously being handled by the #show action in Spree::OrdersController. It involves the user being redirected back to OFN after visiting a Stripe URL.
2022-01-14 19:41:08 +00:00
Matt-Yorkley
6c2b623f8b
Tidy up OrderController
2022-01-14 19:41:08 +00:00
Matt-Yorkley
c65beae869
Extract some methods and move to simpler callbacks with guard clauses
2022-01-14 19:41:08 +00:00
Matt-Yorkley
c4d55feac8
Extract #last_payment
2022-01-14 19:41:08 +00:00
Matt-Yorkley
ddf6e7eadd
Use proper module/namespace
2022-01-14 19:41:08 +00:00
Matt-Yorkley
410485fbf4
Use #order_failed_route in #process_order_completion!
2022-01-14 19:41:08 +00:00
Matt-Yorkley
072f4f4c60
Use new stripe confirm path and remove dead code
2022-01-14 19:41:08 +00:00
Matt-Yorkley
3f3bfadb59
Simplify StripeScaPaymentAuthorize and clarify both return URL types (checkout and off-session)
2022-01-14 19:41:08 +00:00
Matt-Yorkley
789c29f678
Extract #load_checkout_order
2022-01-14 19:41:08 +00:00
Matt-Yorkley
daee5b49b5
Extract #process_payment_completion!
2022-01-14 19:41:08 +00:00
Matt-Yorkley
76647863e8
Add new Stripe controller
2022-01-14 19:41:08 +00:00
Matt-Yorkley
28d89103eb
Extract #gateway_error
2022-01-14 19:41:08 +00:00
Matt-Yorkley
7633255bea
Extract #order_failed_route
2022-01-14 19:41:08 +00:00
Matt-Yorkley
414e1eb299
Tidy up OrdersController#load_order
2022-01-14 19:41:08 +00:00
Matt-Yorkley
6385d9a782
Simplify interface of #order_completion_route
2022-01-14 19:41:08 +00:00
Matt-Yorkley
7cbdb7c1a2
Remove paypal-specific workaround from OrdersController
...
The previous commit means this is no longer needed here.
2022-01-14 19:41:08 +00:00
Matt-Yorkley
1b459b2491
Extract #processing_failed
2022-01-14 19:41:08 +00:00
Matt-Yorkley
c1defdb1ff
Extract #order_processing_error
2022-01-14 19:41:08 +00:00
Matt-Yorkley
5c44614a8d
Extract and standardise payment/checkout #processing_succeeded
2022-01-14 19:41:08 +00:00
Matt-Yorkley
96f30133a7
Don't reset order for split checkout
...
The various places where we "reset" an order to cart state if a checkout submission does not succeed are an artifact of the process-all-the-steps-at-once approach of the current checkout.
2022-01-14 19:41:08 +00:00
Matt-Yorkley
1e21a6a32f
Extract and standardise use of #handle_insufficient_stock
2022-01-14 19:41:08 +00:00
Matt-Yorkley
b6cf6483f2
Extract and standardise use of order loading around checkout processing
2022-01-14 19:41:08 +00:00
Matt-Yorkley
4d6c4f850f
Remove pointless callbacks in CheckoutController
...
These exact same checks are already made in #load_order (and #order_invalid_for_checkout?), which is called before these other two (later) callbacks.
2022-01-14 19:41:08 +00:00
Matt-Yorkley
77d89ec7d0
Extract and standardise use of #order_completion_route
2022-01-14 19:41:08 +00:00
Matt-Yorkley
4c1fc2b326
Standardise use of #order_completion_reset
2022-01-14 19:41:08 +00:00
Matt-Yorkley
124b63fad0
Remove unused flash assignment
2022-01-14 19:41:08 +00:00
Matt-Yorkley
01bd77e437
Remove duplicate translation key
2022-01-14 19:41:08 +00:00
Matt-Yorkley
e58b1b1094
Tidy up before and after callbacks
2022-01-14 19:41:08 +00:00
Matt-Yorkley
9b6d4da8d5
Pull related lines into OrderCompletion#order_completion_reset
2022-01-14 19:41:08 +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
Matt-Yorkley
ad60f2392a
Delete unused return statement
2022-01-14 19:41:08 +00:00
Matt-Yorkley
06eb98bdf4
Extract #valid_order_line_items?
2022-01-14 19:41:08 +00:00
Cillian O'Ruanaidh
22a48de033
Remove unused code for currency select menu which no longer exists
...
This removes inline JavaScript for #8699 . This code was for the old currency select menu which was removed in 4839b7bd63
2022-01-14 12:33:30 +00:00
Filipe
7709e86d41
Merge pull request #8676 from jibees/8668-split-checkout-as-guest
...
Handle checkout as guest feature on split checkout
2022-01-12 20:22:01 +00:00
Filipe
cc0de4618c
Merge pull request #8692 from jibees/8691-make-first-name-and-last-name-fields-mandatory
...
Validate the presence of first/last name if there is no company
2022-01-12 19:48:35 +00:00
Matt-Yorkley
9be37b0aaa
Reset flags when cloning an OC
2022-01-12 11:44:21 +00:00
Matt-Yorkley
54e1a8807a
Use mails_sent flag for tracking mails
2022-01-12 11:44:21 +00:00
Filipe
d66dac4ccb
Merge pull request #8621 from apricot12/Unit-value-shop-front
...
Update units when variant unit name is edited
2022-01-11 17:41:20 +00:00
Filipe
4978c95e75
Merge pull request #8467 from SarvarKh/validate-social-links
...
Fix the issue with 'at' in enterprise twitter and instagram
2022-01-11 12:53:11 +00:00
Filipe
f2b14beea9
Merge pull request #8541 from jibees/8506-improve-shiped-email
...
Improve shipped email design
2022-01-11 11:36:32 +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
Jean-Baptiste Bellet
1a270af82b
Test the presence of the firstname and the lastname if company is not present
...
Co-Authored-By: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com >
2022-01-11 10:30:45 +01:00
Jean-Baptiste Bellet
36db396fe5
Do not redirect if user is logged in
2022-01-10 10:02:08 +01:00
Jean-Baptiste Bellet
9a74934f79
Do not redirect to /guest if step is specified
2022-01-10 09:40:16 +01:00