Ahmed Ejaz
ac06126f59
replace cvv_response_message usage with redirect_auth_url
2025-09-22 11:55:43 +05:00
cyrillefr
cf9395f42f
Fixes RSpecRailsInferredSpecType in spree admin controllers
2025-05-20 12:45:34 +02:00
cyrillefr
5063a772f0
Fixes RSpec Rails HaveHttpStatus cop in controllers
2025-05-14 10:58:04 +02:00
Maikel Linke
6317fe1b71
Disable RSpec monkey patching
2024-05-09 12:24:41 +10:00
Mohamed ABDELLANI
7aad4ad652
Merge branch 'master' into prevent-generate-invoices-when-distributor-cannot-invoice
2024-04-22 10:55:39 +01:00
Maikel Linke
bd6b0ddbf3
Enforce RSpec expect(..).not_to over to_not
2024-03-07 16:57:54 +11:00
Mohamed ABDELLANI
ee1f60808e
prevent generating invoices when order's distributor can't generate invoices
2024-02-29 18:56:52 +01:00
Cillian O'Ruanaidh
f960dec0eb
Display a warning when clicking the generate invoice button if an ABN is required but not present
2024-01-26 14:28:42 +00:00
Ryan Murphy
7e5ad8c8a4
9048: Fix Stripe payment flash rendering issue
2023-11-01 07:33:06 -04:00
Neal Chambers
29df80945d
Fix Style/HashSyntax
2023-09-20 23:46:26 +09:00
Mohamed ABDELLANI
f68064480a
authorize distributor manager to generate invoices
2023-07-06 17:36:13 +01:00
Maikel Linke
15c30246a5
Allow to see only invoices of managed enterprises
2023-07-06 17:36:13 +01:00
Maikel Linke
46410b5be2
Test the right invoices controller
...
I was wondering why the spec didn't work and then I noticed that it was
testing the wrong controller and passing the wrong parameter.
2023-07-06 17:36:13 +01:00
Maikel Linke
85002d3804
Spec bug allowing any enterprise to view invoices
2023-07-06 17:36:13 +01:00
Maikel Linke
145696aa7f
Create only used test data
...
The `params` and the user are created before the request. But, for
example, the enterprise user doesn't need creating when testing
permissions of the normal user.
2023-07-06 17:36:13 +01:00
Mohamed ABDELLANI
3a9a023dea
authorize enterprise users to access invoices page
2023-07-06 17:36:13 +01:00
Neal Chambers
5b6f45931c
Fix Layout/LineLength
2023-06-26 13:06:56 +09:00
Maikel Linke
9998025687
Remove useless test header setup for emails
...
Once upon a time we needed a helper to set the `from` header of emails.
This is now set in the ApplicationMailer and not necessary any more.
2023-04-20 12:15:34 +10:00
cyrillefr
7c24f6b26f
Remove I18n keys from Pay/Stripe/Chkout Ctrllers spec
2023-02-15 11:08:19 +01:00
Maikel Linke
ee85b9654d
Remove references to StripeConnect class
2022-01-24 12:35:45 +11:00
Filipe
b256696544
Merge pull request #8549 from mkllnk/deprecate-stripe-connect
...
Hide old "Stripe" (StripeConnect) payment method type, keep new Stripe SCA
2021-12-23 21:33:42 +00:00
Maikel Linke
178d296c9f
Adapt specs to use stripe_sca_payment_method
...
There are still some specs directly related to StripeConnect and I left
them for now.
2021-12-20 15:00:14 +11: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
Luis Azcuaga
e8fd89a6d2
Run rubocop over existing todo
2021-10-25 21:28:28 -05:00
Maikel
a3c31f7d86
Revert "Kill stripe connect"
2021-09-20 08:39:34 +10:00
Nihal
98a879a0e9
Restore removed spec to profile_storer_spec
2021-09-10 14:43:34 +05:30
Luis Ramos
f90e34bb47
Adapt specs to use stripe_sca_payment_method factory and delete stripe_connect_payment_method
2021-09-10 14:43:34 +05:30
Luis Ramos
9de9b41575
Remove stripe connect spec, there's a similar spec for stripesca below
2021-09-10 14:43:34 +05:30
Matt-Yorkley
7e3b9be506
Allow StripeSCA Gateway to actually void payments
2021-07-30 11:48:57 +01:00
Andy Brett
aa8067f96b
process payments separately from completing the order
2021-06-29 11:54:48 -07:00
Pau Pérez Fabregat
db993652c4
Merge branch 'master' into payment-states
2021-06-18 12:20:26 +02:00
Andy Brett
2699e17b63
update specs to create payment in requires_authorization state
2021-06-17 14:23:59 -07:00
Luis Ramos
23627c5453
Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
...
9290 issues fixed
2021-06-17 22:19:26 +01:00
Matt-Yorkley
00988dc1e7
Use :order_with_totals factory in payments controller spec
...
This factory makes an order that actually has a line item 👍
2021-06-06 20:20:41 +01:00
Andy Brett
b3e08b47b9
set Stripe api key directly instead of using allow
2021-06-01 22:33:12 +01:00
Andy Brett
70ac719725
Merge pull request #7649 from andrewpbrett/payments-when-out-of-stock
...
Check stock before doing anything related to admin payments
2021-05-19 14:45:38 -07:00
Andy Brett
ca38948e21
check stock before doing anything related to admin payments
2021-05-14 17:42:37 -07:00
Matt-Yorkley
8e10f7af0e
Update payments controller test setup
...
We need to use a completed order in the test setup here or it doesn't behave correctly. `order.completed_at` is nil, for example.
2021-05-04 16:40:10 +01:00
Pau Perez
5815d1a4a4
Make #outstanding_balance return an OrderBalance
...
This will let us branch by abstraction. All existing calls to
`#outstanding_balance` will go through `OrderBalance` hence, will
check the feature toggle.
Note that by default, `OrderBalance` will end up calling
`#old_outstanding_balance`. As the name states, that's exactly what
`#outstanding_balance` was so far. This means no consumers will see any
change in behavior. We just added on item in the call stack (sort of).
2021-03-22 11:45:12 +01:00
Andy Brett
b8629e847c
Merge pull request #7014 from andrewpbrett/canceled-order-payments
...
Add resumed to list of allowable order states to view the payment tab
2021-03-17 10:46:51 -07:00
Pau Perez
7a3121b624
Move invoice-related specs to their own file
...
The `Spree::Admin::OrdersController`'s test file quite long (as well as
the controller itself) but it'll grow more in the upcoming commits.
That's just a symptom of that controller having too many
responsibilities. It does much more than CRUD on `Spree::Order` (the
Rails convention).
Things like invoices are an entity on their own and would better fit
into a `InvoicesController`. Hopefully, splitting up the tests is hint
for the next dev to do that.
2021-03-15 12:45:27 +01:00
Andy Brett
95c232dfe7
add spec for a resumed order
2021-03-08 08:54:28 -08:00
Andy Brett
a02065b66f
allow access to payments tab for canceled orders
2021-03-01 19:51:50 -08:00
Matt-Yorkley
d9bd0e8f0e
Use alternate method for setting request.referer in controller specs
...
Apparently stubbing `request.referer` is tricky business in Rails 5... :shrugs:
2021-02-09 11:57:00 +00:00
Andy Brett
903b2e7ff4
whitelist allowed events to be sent to a Payment
2021-01-21 09:18:29 -08:00
Andy Brett
ab5ffead1d
require that the redirect url be to stripe.com and over https
2021-01-21 09:18:29 -08:00
Andy Brett
d76db9ee51
update payment controller spec to move payment to pending
2021-01-21 09:18:29 -08:00
Andy Brett
802e49bed3
add PaymentMailer and send email if payment auth is required
2021-01-21 08:24:01 -08:00
Pau Pérez Fabregat
fa812364ff
Merge pull request #6453 from andrewpbrett/fix-void-payment-error
...
fix #5829 (Voiding an initial payment (i.e. a full refund) after partially refunding the order is not possible with Stripe-SCA)
2020-12-14 09:48:41 +01:00
Andy Brett
e866e983f6
add spec for partially refunded SCA orders
2020-12-07 14:51:47 -08:00