1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
Commit Graph

1918 Commits

Author SHA1 Message Date
Sylvain
3dc686840c front adaptation to cartItems
fix payzen customer cart creation
TODO: refactor the payOnSite modals
2021-04-27 17:18:20 +02:00
Sylvain
e75259734c fix test Subscriptions::CreateAsAdminTest
user_id must be read from [:cart_items][:customer_id]
2021-04-27 13:51:23 +02:00
Sylvain
1bf091081b fix test Reservations::CreateAsAdminTest
create subscription from POST api/reservation if the parameter subscription.plan_id is provided
+ cart_items are not wrapped in a reservation object
2021-04-26 18:27:35 +02:00
Sylvain
d5f7bd7abd fix test Reservations::CreateTest
create subscription w/ the reservation if applicable
+ refactor payments_controller to factorize the on_*_success codes
2021-04-26 17:42:03 +02:00
Sylvain
da372cf8ad fix test Events::AsUserTest
the event price calculalation was using a variable not reinitialized
2021-04-26 16:38:00 +02:00
Sylvain
53e9a1c4f2 fix running test create_as_admin_test
- do not create an empty payment gateway object if not needed
2021-04-26 12:00:07 +02:00
Sylvain
a2d870f680 migrate wall-info to use cartitems 2021-04-26 11:46:14 +02:00
Sylvain
6b8f7da98c migrate js clients to new architecture 2021-04-26 11:41:02 +02:00
Sylvain
b9e8c8867c fix running test renew_as_admin_test 2021-04-26 11:40:26 +02:00
Sylvain
bc6ef8ef50 WIP: move backend code base to new architecture
- from stripe only to payment gateway abstract
- from reservation params style to unified cart_items

TODO: fix not passing tests,
subscriptions/renew_as_admin_test.rb fails because InvoiceItem(9).amount = nil
2021-04-23 17:54:59 +02:00
Sylvain
94cbcd3236 refactor to use the new price computation system based on ShoppingCart 2021-04-23 12:52:06 +02:00
Sylvain
e456ddc7c9 WIP: refactor the price computation system 2021-04-22 19:24:08 +02:00
Sylvain
26dfbef5e1 WIP: refactor models to use payment_gateway_objects 2021-04-21 17:38:06 +02:00
Sylvain
434ec9c205 refactored Invoices to get rid of stripe references 2021-04-20 17:22:53 +02:00
Sylvain
a897d37b2d improved footprint debug process 2021-04-16 16:03:10 +02:00
Sylvain
4ffd357841 WIP: migrate stripe ids in DB 2021-04-16 12:25:48 +02:00
Sylvain
343b2f7d23 refactor code related to archiving 2021-04-16 10:34:02 +02:00
Sylvain
1bbb8c3965 move the architecture from stripe-only to gateway-generic 2021-04-15 17:01:52 +02:00
Sylvain
ddd1ac52d6 save reservation|subscription to db after payment 2021-04-14 17:56:10 +02:00
Sylvain
07ea6e8c69 renamed SUPERADMIN_EMAIL to ADMINSYS_EMAIL
The previous was too much subject to confusions
2021-04-14 15:04:41 +02:00
Sylvain
4d3ead310d do not run StripeWorker tasks is the gateway is not enabled 2021-04-14 12:18:37 +02:00
Sylvain
4e512dda45 validate the payment server side 2021-04-13 17:16:05 +02:00
Sylvain
dbbf6b5f63 fix KryptonConfig 2021-04-13 11:33:15 +02:00
Sylvain
c0afe9419e consolidated the payzen process with types 2021-04-13 11:30:30 +02:00
Sylvain
dca2651fb3 process payements with payzen 2021-04-12 17:37:09 +02:00
Sylvain
ef7dcd37d8 retreive the formToken from PZ API 2021-04-12 12:16:12 +02:00
Sylvain
b3720d7f47 direct the stripe endpoints to /api/stripe 2021-04-12 10:48:30 +02:00
Sylvain
fd5c3a87ce rename /api/payment to /api/stripe
other payment gateways will have their own separate endpoints
2021-04-12 10:45:41 +02:00
Sylvain
f232e586ce payment endpoint is specific to stripe 2021-04-12 10:44:20 +02:00
Sylvain
954a35f006 refactor api files 2021-04-12 10:42:54 +02:00
Sylvain
23032c405b WIP: create the formToken server-side 2021-04-09 17:17:58 +02:00
Sylvain
fe5c4e6233 integrate the payzen form widget into the modal
Also: do not fetch the api from unmounted components
2021-04-09 12:09:54 +02:00
Sylvain
5e2c50a85f PaymentModal : automatically determines the payment modal to used based on the configured payment gateway 2021-04-09 09:03:59 +02:00
Sylvain
4d0dc808e8 move stripe & payzen components folders into payment/ 2021-04-09 08:47:34 +02:00
Sylvain
b5ab9fbc79 rename PaymentModal to AbstractPaymentModal 2021-04-09 08:40:46 +02:00
Sylvain
4f3a47ae04 move payment modal from /base to /payment 2021-04-09 08:39:03 +02:00
Sylvain
fb2abcc382 integrate payzen logo and other fixes 2021-04-08 17:11:48 +02:00
Sylvain
d70d0dcf7a stripe modal -> generic payment modal 2021-04-08 15:21:24 +02:00
Sylvain
d091c44c11 fix: This object has been frozen and should not be mutated 2021-04-08 11:09:33 +02:00
Sylvain
6da577d4ae reorganized react components 2021-04-08 10:46:09 +02:00
Sylvain
a55dd4dc71 display errors in fab-input 2021-04-08 10:00:19 +02:00
Sylvain
4a344ac9e3 reorganized react components 2021-04-08 09:35:09 +02:00
Sylvain
eea390bdd4 workaround for project rejection 2021-04-07 17:42:15 +02:00
Sylvain
4245747072 include payzen frontend libs if enabled 2021-04-07 17:17:17 +02:00
Sylvain
635e8d3356 use HtmlTranslate component 2021-04-07 16:25:14 +02:00
Sylvain
67d0ce24b4 set payzen currency
also: refactored the comments in the react components to fit high quality
2021-04-07 16:21:12 +02:00
Sylvain
df7893f65f open modal to edit the keys of the payment gateway 2021-04-07 11:36:04 +02:00
Sylvain
94c4d318e1 fix top-margin 2021-04-06 18:05:08 +02:00
Sylvain
0cca08984f use flex-start 2021-04-06 18:00:55 +02:00
Sylvain
36871a0b34 improved display 2021-04-06 18:00:13 +02:00
Sylvain
667f6f6229 show recapitulative of payzen settings 2021-04-06 17:47:47 +02:00
Sylvain
63c81b82c1 Merge branch 'dev' into payzen 2021-04-06 15:03:27 +02:00
Sylvain
3483e1355c updated openlab + handle missing dev instance 2021-04-06 14:58:12 +02:00
Sylvain
e06f3beeab [bug] notification not sent
notification sent to the project author when a collaborator has confirmed his participation
2021-04-06 14:16:03 +02:00
Sylvain
422acdd162 safely configure and test payzen keys 2021-04-02 17:16:27 +02:00
Sylvain
98bb9d082c fix fab-input and payzen-keys-form 2021-04-02 16:02:50 +02:00
Sylvain
30830b56fd PayZen REST API wrapper ruby + live test keys while configuring 2021-04-01 18:20:26 +02:00
Sylvain
69352c07df validate payzen paramaters in the form 2021-03-31 17:58:09 +02:00
Sylvain
54c1a3cfd9 payzen keys configuration form 2021-03-31 16:03:51 +02:00
Sylvain
1d42fa8781 typos 2021-03-30 16:57:09 +02:00
Sylvain
83cfa710e1 enable online payments 2021-03-30 16:54:43 +02:00
Sylvain
c25e54a6af save & retreive stripe settings 2021-03-30 15:56:36 +02:00
Sylvain
720328ee92 stripe keys form w/ live keys validation 2021-03-30 11:26:47 +02:00
Sylvain
5aacd6695c Merge branch 'dev' into payzen 2021-03-30 09:22:47 +02:00
Sylvain
10dd5d2cca [bug] create a training availability with calendar in month view result in wrong dates 2021-03-29 16:05:53 +02:00
Sylvain
e38228ae7e prevent notification crash on nil reservation 2021-03-29 10:19:37 +02:00
Sylvain
818e9e99fc [bug] unable to update a coupon 2021-03-29 10:19:06 +02:00
Sylvain
c50e69b351 Enforced validation on required input fields 2021-03-24 18:24:03 +01:00
Sylvain
abd6ecabc3 WIP: fab-input component 2021-03-24 17:31:50 +01:00
Sylvain
b5e0572a6b fix devise modal 2021-03-24 15:51:02 +01:00
Sylvain
78b007a9ec [bug] unable to add a new authorized file type for project's CAD files 2021-03-24 15:39:18 +01:00
Sylvain
5b854ea831 Merge branch 'dev' into payzen 2021-03-24 14:34:24 +01:00
Sylvain
1749dea0e2 fix tests 2021-03-23 12:32:59 +01:00
Sylvain
7099f1f317 address required
- Ability to set the address as a mandatory field
- The address is new requested when creating an account
- The profile completion page is less fuzzy for people landing on it without enabled SSO
2021-03-23 11:49:05 +01:00
Sylvain
f535be5b05 WIP: address_required 2021-03-22 18:02:56 +01:00
Sylvain
a5b3728f8c [bug] various fixes on accouting exports
- accounting exports may ignore some invoices for the first and last days
- file caching for accounring exports is not used
2021-03-22 17:42:54 +01:00
Sylvain
39a7e23881 Improved style of public plans page 2021-03-22 13:13:51 +01:00
Sylvain
ef32532cf5 Links created using medium editor opens in new tabs 2021-03-22 11:32:04 +01:00
Sylvain
e9185bd402 [bug] recurring availabilities are not restricted to subscribers 2021-03-22 10:43:45 +01:00
Sylvain
b19c78c756 [bug] select all plans for slot restriction
When using the 'select all' button, to restrict an availbility to subscribers, all plans are selected, even those disabled
2021-03-22 10:36:41 +01:00
Sylvain
be464a8a61 WIP: migrate stripe keys form to react 2021-03-10 17:15:36 +01:00
Sylvain
18465ee8e9 select gateway modal 2021-03-10 16:46:18 +01:00
Sylvain
141f4f31b1 Merge branch 'dev' into payzen 2021-03-10 15:23:56 +01:00
Sylvain
9d747db095 Ability to disable the trainings module 2021-03-10 13:25:53 +01:00
Sylvain
cd30e0d8d8 [bug] statistics: select machines as default tab if subscriptions is disabled 2021-03-09 12:39:25 +01:00
Sylvain
3d5484918c eslint controllers/admin/statistics.js 2021-03-09 11:41:24 +01:00
Sylvain
8bc040ae8b show group in email notif on account creation 2021-03-09 11:34:39 +01:00
Sylvain
6817adc82d Merge branch 'dev' into payzen 2021-03-08 15:50:06 +01:00
Sylvain
5527512b05 Show remaining training credits in the dashboard 2021-03-08 15:17:58 +01:00
Sylvain
2d70a4d07e Do not close login modal when clicking on the backdrop 2021-03-08 14:21:58 +01:00
Sylvain
19055c4f78 Use the primary color to display plans' price in the public view 2021-03-08 14:14:14 +01:00
Sylvain
10fbea9289 Allow writing short rich descriptions for each subscription plan 2021-03-08 14:09:11 +01:00
Sylvain
a74c5d4c95 WIP: plan description 2021-03-03 17:21:11 +01:00
Sylvain
ab3ac05aa3 Allow inserting hyperlinks in customized info messages 2021-03-03 15:33:03 +01:00
Sylvain
3ea06826ad WIP: select gateway 2021-03-03 15:28:56 +01:00
Sylvain
f9e775ac35 [bug] do not send notifications each hour for payment schedules deadlines 2021-03-03 09:09:17 +01:00
Sylvain
544b00e8a7 [bug] do not display "powered by disqus" if Disqus is disabled 2021-03-02 17:03:03 +01:00
Sylvain
120c9144bb [security] restrict allowed keys when creating/updating credits 2021-02-24 11:11:18 +01:00
Sylvain
9ed1bbcad8 updated changelog 2021-02-24 08:56:37 +01:00
Sylvain
d7056f0adc fix footprints checking for payment schedule items 2021-02-23 14:04:42 +01:00
Sylvain
c9cea041dd updated links to user's guide 2021-02-22 19:26:38 +01:00
Sylvain
9d667ef54f allow managers to view/manage schedules 2021-02-22 16:18:08 +01:00
Sylvain
305e462011 on stripe subscription renew: cancel subscription after the last deadline 2021-02-22 11:28:52 +01:00
Sylvain
0b3a02a05d handle errors in PaymentScheduleItemWorker 2021-02-22 11:27:29 +01:00
Sylvain
2ef4e52885 use File.join to concat path 2021-02-22 10:19:44 +01:00
Sylvain
c478ade85c fix admin operations on subscriptions w/ schedules 2021-02-10 17:24:03 +01:00
Sylvain
fa686187cd admin can subscribe in member/edit w/ schedule 2021-02-10 15:43:53 +01:00
Sylvain
b48a2738ec prevent allowing payment schedules w/ plans < 1 month 2021-02-10 14:19:14 +01:00
Sylvain
ecb23c02b9 fix extend susbcription w/ payment schedule 2021-02-10 13:32:13 +01:00
Sylvain
44030793ee fix schedulable plans border color, in casemate theme 2021-02-10 11:56:45 +01:00
Sylvain
1cc727de6b fix schedulable plans border color, in casemate theme + typo 2021-02-10 11:50:12 +01:00
Sylvain
8468a3c6de rake task to regenerate payment schedules PDF files 2021-02-10 11:40:23 +01:00
Sylvain
8417c91e6a features tour for payment schedules management interface 2021-02-10 10:58:45 +01:00
Sylvain
9609d96fc3 adjust payment schedule table to usage by admins & members 2021-02-10 10:03:04 +01:00
Sylvain
16bb4bc76d WIP: payment schedules dashboard 2021-02-09 17:18:33 +01:00
Sylvain
d767cf5f85 improve style of plans presentation 2021-02-09 16:40:04 +01:00
Sylvain
f3ad59d33a fix cancel schedule 2021-02-09 16:26:09 +01:00
Sylvain
ff0c69fc58 stripe card update + cancel subscription 2021-02-09 15:44:56 +01:00
Sylvain
b0ef9e097d WIP: stripe update card 2021-02-09 12:09:26 +01:00
Sylvain
d1584604b3 fix a rounding error with coupons 2021-02-08 15:42:45 +01:00
Sylvain
0e7226c85c handle stripe requires_action 2021-02-08 15:28:47 +01:00
Sylvain
38ac55c35f [bug] no notifications for refunds generated on wallet credit 2021-02-08 13:50:49 +01:00
Sylvain
76ebb3ccb4 run the PaymentScheduleItemWorker more ofter and tell the users that they ahev only 24h to fix the payment 2021-02-08 10:05:54 +01:00
Sylvain
58af40b8b9 enlight api for cashing checks 2021-02-08 08:56:01 +01:00
Sylvain
b5cdea513d confirm check cashing api 2021-02-04 17:51:16 +01:00
Sylvain
d54846c349 UI to confirm check cashing 2021-02-04 17:00:02 +01:00
Sylvain
d22d011a10 show more results for the payment schedules interface 2021-02-04 15:47:11 +01:00
Sylvain
eddf23622d Merge branch 'dev' into monthly-payment 2021-02-02 17:17:15 +01:00
Sylvain
588b8050db [bug] when an event is modified, the member's reservations does not reflect the new event date 2021-02-02 15:52:55 +01:00
Sylvain
1c22d3a62a keep backward compatible openapi errors 2021-02-02 11:28:31 +01:00
Sylvain
30e9f6febf OpenAPI endpoints to create/update/show/delete machines 2021-02-01 17:43:15 +01:00
Sylvain
163976b988 WIP: error handling for card payments on later deadlines 2021-01-27 17:24:10 +01:00
Sylvain
8d08100166 WIP: schedules management inerface 2021-01-27 13:59:41 +01:00
Sylvain
39c3164b47 WIP: admin interface to manage payment schedules 2021-01-26 17:31:11 +01:00
Sylvain
5e06de508d interface to filter list of schedules 2021-01-26 11:37:05 +01:00
Sylvain
def0778a4d basic inteface to retrieve payment schedules 2021-01-25 17:42:30 +01:00
Sylvain
01a0612a4b fix create invoice for each due date 2021-01-25 14:37:07 +01:00
Sylvain
26636254bd generate the invoices for each schedule item and notify if something goes wrong 2021-01-25 13:05:27 +01:00
Sylvain
ecdec70755 WIP: generate invoices for each payment schedule item 2021-01-20 17:00:23 +01:00
Sylvain
8adb569891 fix payment schedule total 2021-01-20 13:47:29 +01:00
Sylvain
e5439901d6 fix generate payment schedule pdf + send by mail
TODO: total amount does not match with sum of all lines
- generate invoices for each PS-item
- interface to access the payment schedules
2021-01-19 16:47:51 +01:00
Sylvain
12e99f4c9c generate payment schedule pdf 2021-01-04 18:12:44 +01:00
Sylvain
37af665991 save subcription id in payment schedule item 2021-01-04 17:03:44 +01:00
Sylvain
8b13ae45ac all tests passing 2021-01-04 16:26:52 +01:00
Sylvain
728ae4310c improved testing of payment schedules + some fixes
TODO: fix the test
rails test test/integration/reservations/create_test.rb
Reservations::CreateTest#test_user_reserves_a_machine_and_renew_a_subscription_with_payment_schedule_and_coupon_and_wallet [test/integration/reservations/create_test.rb:841]
Minitest::Assertion: Expected: "stripe"
  Actual: nil
2020-12-30 18:43:33 +01:00
Sylvain
d891690ab8 Default texts for the login modal 2020-12-30 15:37:15 +01:00
Sylvain
dc00df4afc fix stripe subscription w/ coupon + wallet 2020-12-30 12:19:33 +01:00
Sylvain
b8319a5124 handle percent coupons w/ stripe subscriptions 2020-12-30 10:17:39 +01:00
Sylvain
fba5f57a1c handle wallet transaction w/ stripe subscription 2020-12-29 18:55:00 +01:00
Sylvain
f4f1464826 fix wallet-info component to use cartItems 2020-12-29 17:32:00 +01:00