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

525 Commits

Author SHA1 Message Date
Sylvain
67850a6f9f (feat) optional sso debug logs according to SSO_DEBUG env var 2022-01-17 15:24:07 +01:00
Sylvain
634da414f8 (feat) When a payment schedule is in error or canceled, ability to re-enable it with another payment method 2022-01-17 12:38:53 +01:00
Sylvain
a91610f530 Optimized multiple DB queries 2022-01-11 16:04:14 +01:00
Sylvain
9922812111 Ability to select "bank transfer" as the payment mean for a payment schedule 2022-01-05 15:58:33 +01:00
Sylvain
effe5c7ba9 optimized the load time of the payment schedules list
From now, we no longer retrieve the client_secret directly from the API/list but from a specialized component which ask API/get_item.
This highly decrease the laod time needed to fetch API/list
2022-01-03 11:24:08 +01:00
Sylvain
00b9bce587 export collected VAT by rate 2021-12-29 17:00:54 +01:00
Sylvain
fe96e01b7f refactor spaces/extended_prices code architecture to match the FM style guide 2021-12-28 11:25:10 +01:00
vincent
bd781a14e9 Add extended price 2021-12-21 17:13:40 +01:00
Sylvain
6091cec82e api endpoint to create prices 2021-12-21 14:18:03 +01:00
Sylvain
d6b30875a4 compute the price based on custom durations 2021-12-20 17:08:14 +01:00
Sylvain
ca603f85af fix uninitialized constant PayZen::Service 2021-10-22 15:12:25 +02:00
Sylvain
d0eebddcee [bug] payzen amount for non 2-decimals currencies 2021-10-18 12:14:51 +02:00
Sylvain
4c56dffc04 remove deprecated code and endpoints 2021-10-18 10:15:48 +02:00
Sylvain
fd39eaf2f1 fix renew subscription API
TODO:
- remove old endpoints
- bug in UI (start date invalid)
- fix tests
- payzen
2021-10-15 17:31:01 +02:00
Sylvain
3349cc3a2d fix test on paymentSchedules 2021-10-15 11:55:30 +02:00
Sylvain
315e899540 [WIP] fix tests 2021-10-14 18:20:10 +02:00
Sylvain
17a0baac7e refactored free subscription extending 2021-10-12 14:07:35 +02:00
Sylvain
e646eb8cb5 extend subscription UI 2021-10-08 19:14:47 +02:00
Sylvain
676f921d66 fix some errors about stp subscription refacto + improved error handling 2021-10-07 17:07:46 +02:00
Sylvain
3663f8ab86 full stripe subscription code refacto
TODO: test
2021-10-06 17:09:35 +02:00
Sylvain
d494b012d4 [ongoing] refactoring stripe subscription 2021-10-06 09:42:58 +02:00
Du Peng
2973dec6a7 rewrite payment schedule workflow by stripe 2021-09-08 18:57:10 +02:00
Sylvain
19717d1351 use localPaymentModal in cart directive 2021-06-30 16:35:25 +02:00
Sylvain
10aaf0042c integration of packs-summary 2021-06-29 15:59:57 +02:00
Sylvain
baf41588d3 packs summary component 2021-06-29 11:14:36 +02:00
Sylvain
f16cbc44ff WIP: buy pack modal 2021-06-25 17:24:34 +02:00
Sylvain
26f98f30f6 edit pack modal 2021-06-25 09:56:39 +02:00
Sylvain
5d3391cd44 move new pack to a separate component 2021-06-25 09:28:05 +02:00
Sylvain
0345d22582 delete & disable packs 2021-06-24 17:59:05 +02:00
Sylvain
1a65b97653 Merge branch 'dev' into prepaid 2021-06-24 17:15:17 +02:00
Sylvain
d7ba83f6a0 WIP: migrate machine pricing edition interface to react 2021-06-22 11:13:44 +02:00
Sylvain
d54f30e048 WIP: interface to configure packs 2021-06-21 17:39:48 +02:00
Sylvain
a61a2e96d8 [bug] unable to export members list (#287) 2021-06-21 12:08:23 +02:00
Sylvain
f91ee24639 [bug] the training validation modal shows cancelled trainings 2021-06-15 10:18:14 +02:00
Sylvain
569be57a1f [bug] a message tells that creating a new plan fails, but it worked 2021-06-14 16:53:52 +02:00
Sylvain
ec301ba07e [bug] unable to list user's payment schedules in the dashboard 2021-06-14 14:40:54 +02:00
Sylvain
0c72cde67b [bug] unable to process stripe payments with 3DS authentication
>
> Backported from v4.7.13:
> 9b90ff0482
2021-06-11 16:14:30 +02:00
Sylvain
e184bf3d3c filter plans y duration 2021-06-10 14:06:53 +02:00
Sylvain
a416f8c7ae transactional bulk update + better error handling while configuring the payment gateway 2021-06-10 10:39:42 +02:00
Sylvain
1f07f4c2fb fix data migration 2021-06-09 16:42:06 +02:00
Sylvain
05882b3743 display list of plans grouped by category 2021-06-09 13:03:58 +02:00
Sylvain
4ca16c2688 associate plan w/ category 2021-06-08 17:26:40 +02:00
Sylvain
ae039cdd0c ordering categories 2021-06-08 17:00:52 +02:00
Sylvain
e1e446ab3f API+ interface to CRUD plan categories 2021-06-08 16:43:43 +02:00
Sylvain
68f64cfc5c update the card for payment schedules 2021-06-04 18:26:20 +02:00
Sylvain
89adcf1a9d WIP: pay item 2021-06-03 16:25:42 +02:00
Sylvain
431ea28448 WIP: payzen recurring payments 2021-06-01 12:20:02 +02:00
Sylvain
d942d46632 WIP: migration to object[]
TODO: fix running tests, fix front-end
2021-05-28 17:34:20 +02:00
Sylvain
5f5ec8dbb6 remove references to Invoice.invoiced 2021-05-27 15:58:55 +02:00
Sylvain
c79078c8e1 Merge branch 'dev' into payzen 2021-05-26 14:00:51 +02:00
Sylvain
413bb57c38 [bug] zero-decimal currencies w/ stripe 2021-05-26 13:38:16 +02:00
Sylvain
c7a59c8cb7 WIP: refactoring to singularize the booking process
We need to achieve only one process for all booking, not one for subscription, one for reservations, etc.
Moreover we must store one object per invoice_item/payment_schedule_object and stop using Invoice.invoiced or PaymentSchedule.scheduled
2021-05-21 18:25:18 +02:00
Sylvain
66f81a975e WIP: array of items
Migration from cart_items:{reservation:{}, subscription:{}, ...}
to cart_items:{items:[{reservation:{}, ...}], ...}
2021-05-19 18:12:52 +02:00
Sylvain
6bcd9f6fef Merge branch 'dev' into payzen 2021-05-17 15:07:41 +02:00
Sylvain
7ac119d4cf [bug] invoices are not generated in test/development if the configured locale is composed
Eg. If locale is fr-CA, it was crashing. If locale was only fr, is was working.
Now, composed locales print the watermark using the base locale and
hour_minute format is fetched from the base locale
2021-05-12 17:23:42 +02:00
Sylvain
390f62fd41 [bug] the count of successfully updated events was not correct 2021-05-12 15:53:32 +02:00
Sylvain
e3187460ea create payment schedules on payzen
Also: make generic the creation of products on remote gateway
Also: make generic the call to gateway specific actions
2021-04-30 16:07:19 +02:00
Sylvain
5f47624d4e WIP: create payment schedule w/ payzen 2021-04-29 17:10:02 +02:00
Sylvain
23e38238c8 fix payment on site modal in case of payment schedule 2021-04-28 17:25:42 +02:00
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
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
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
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
ef7dcd37d8 retreive the formToken from PZ API 2021-04-12 12:16:12 +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
23032c405b WIP: create the formToken server-side 2021-04-09 17:17:58 +02:00
Sylvain
422acdd162 safely configure and test payzen keys 2021-04-02 17:16:27 +02:00
Sylvain
30830b56fd PayZen REST API wrapper ruby + live test keys while configuring 2021-04-01 18:20:26 +02:00
Sylvain
c25e54a6af save & retreive stripe settings 2021-03-30 15:56:36 +02: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
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
a74c5d4c95 WIP: plan description 2021-03-03 17:21:11 +01:00
Sylvain
120c9144bb [security] restrict allowed keys when creating/updating credits 2021-02-24 11:11:18 +01:00
Sylvain
16bb4bc76d WIP: payment schedules dashboard 2021-02-09 17:18:33 +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
0e7226c85c handle stripe requires_action 2021-02-08 15:28:47 +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
def0778a4d basic inteface to retrieve payment schedules 2021-01-25 17:42:30 +01:00
Sylvain
8b13ae45ac all tests passing 2021-01-04 16:26:52 +01:00
Sylvain
feeed2f450 fix take a reservation + subscription
FIXME:
ActionView::Template::Error (undefined method `iso8601' for nil:NilClass)
Callstack:
  app/views/api/reservations/show.json.jbuilder:40:in `_app_views_api_reservations_show_json_jbuilder'
  app/controllers/api/payments_controller.rb:91:in `confirm_payment_schedule'
2020-12-28 18:30:27 +01:00
Sylvain
65277800e2 fix creation subcription on stripe 2020-12-23 16:25:24 +01:00
Sylvain
f661428db2 better error handling in stripe::subscription creation process 2020-12-23 15:29:56 +01:00
Sylvain
bbf88846dd refactored Invoice & PaymentSchedule to use inheritance 2020-12-22 14:43:08 +01:00
Sylvain
609d19e5d1 refactored subscription process + renew (update) subscription/ offre free days 2020-12-21 16:12:34 +01:00
Sylvain
40c78974b8 refactoring of reservation:pay_and_save
TODO: debug with tests,
refactor subscription:pay_and_save on the same template
2020-12-16 18:33:43 +01:00
Sylvain
ccff463165 test subscription with schedule by user 2020-12-15 15:48:13 +01:00
Sylvain
908ccf5bab handle reservations+subscription w/ schedule
integration testing for payment schedule
debug reservation process
2020-12-14 17:42:23 +01:00