Sylvain
676f921d66
fix some errors about stp subscription refacto + improved error handling
2021-10-07 17:07:46 +02:00
Sylvain
d942d46632
WIP: migration to object[]
...
TODO: fix running tests, fix front-end
2021-05-28 17:34:20 +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
23e38238c8
fix payment on site modal in case of payment schedule
2021-04-28 17:25:42 +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
94cbcd3236
refactor to use the new price computation system based on ShoppingCart
2021-04-23 12:52:06 +02:00
Sylvain
4e512dda45
validate the payment server side
2021-04-13 17:16:05 +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
b0ef9e097d
WIP: stripe update card
2021-02-09 12:09:26 +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
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
Sylvain
c3c881d2a8
process the schedule to the stripe subscription
...
- only for subscriptions for now
- TODO: reservations (see app/services/reservations/reserv.rb:13)
2020-12-09 16:47:51 +01:00
Sylvain
8e8fc9b682
validate reservation/subscription after payment schedule creation
2020-12-08 17:30:33 +01:00
Sylvain
1d64c517c9
create stripe's paymentIntent
...
associate the paymentMethod (the card) with the customer (the user)
for futur usages in subscriptions
2020-12-08 12:26:03 +01:00
Sylvain
34a9084501
pass payment method to the ruby service
2020-11-23 11:48:44 +01:00
Sylvain
21bd1312bc
compute payment schedule + basic display
2020-11-03 16:50:11 +01:00
Sylvain
5eae1c74a8
[bug] Unable to access the invoices section if the stripe key was not set or incorrect
2020-07-01 12:15:45 +02:00
Sylvain
78518e17fb
read stripe_currency from the UI
...
We prevent the currency from being changed if any stripe payment was made, because a stripe user cannot made pay with different currencies. If we try to charge a user with a different currency than the currency he used for a previous payment, this will fail; so we must prevent this case
2020-06-10 16:37:11 +02:00
Sylvain
82d6677cff
read stripe_api_key from db
2020-06-10 11:33:03 +02:00
Sylvain
06b5da9df8
configure online payment from the UI
2020-06-08 17:42:59 +02:00
Sylvain
1fdea63828
correct some errors due to Price.compute refactoring
2020-05-11 10:56:23 +02:00
Sylvain
be23cf27c3
use Price.compute to generate invoice items
2020-05-06 12:43:47 +02:00
Sylvain
539eb08b89
ability to disable the online payments through an env var
2019-09-11 17:08:00 +02:00
Sylvain
d977838d52
fix tests according to changes for stripe SCA
2019-09-11 16:20:47 +02:00
Sylvain
f60d19fa27
allow reservations & subscriptions at price of zero
2019-09-11 11:51:04 +02:00
Sylvain
75f483a7a6
compute subscription price server-side for payments
2019-09-11 10:31:22 +02:00
Sylvain
ac0489a496
[bug] wallet usage is noted on subscription invoices even if wallet was not used + use payment confirm API for subscriptions only (sca)
2019-09-10 17:57:46 +02:00
Sylvain
4d0ac9b3ca
using stp_payment_intent_id instead of stp_invoice_id on new invoices
2019-09-10 16:45:45 +02:00
Sylvain
04f17d44d8
handle sca in js frontend
2019-09-10 12:46:02 +02:00
Sylvain
a96050a2e9
refactor payment process for sca
2019-09-10 11:46:14 +02:00
Sylvain
e9e27663cd
quick coding rules checking with rubocop
2019-09-09 18:04:31 +02:00
Nicolas Florentin
e94cf46fa4
ongoing work on sca stripe
2019-09-09 17:37:54 +02:00
Sylvain
510533e080
handle 2nd confirmation on server + display confirmation modal on the client
2019-09-05 17:17:51 +02:00
Sylvain
12447698f8
collect card details on the client & create a paymentIntent on the server
2019-09-05 16:17:02 +02:00
Sylvain
a0961314a4
[ongoing] upgrade stripe gem & api version to allow SCA
2019-09-05 11:03:22 +02:00