mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
(bug) PayZen amount of subscription compute error for Coupon validity per user = forever
This commit is contained in:
parent
71275f18a1
commit
903a84f802
@ -1,6 +1,7 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Fix a bug: unable to show wallet payment mean for invoice
|
||||
- Fix a bug: PayZen amount of subscription compute error for Coupon validity per user = forever
|
||||
- improvement: remove show_username_in_admin_list setting
|
||||
- improvement: show invoice payment method in accounting line
|
||||
- [TODO DEPLOY] `rails fablab:setup:build_accounting_lines`
|
||||
|
@ -16,9 +16,11 @@ class PayZen::Service < Payment::Service
|
||||
order = PayZen::Order.new.get(order_id, operation_type: 'VERIFICATION')
|
||||
client = PayZen::Charge.new
|
||||
token_id = order['answer']['transactions'].first['paymentMethodToken']
|
||||
coupon = payment_schedule.coupon
|
||||
amount = coupon && coupon.validity_per_user == 'forever' ? first_item.amount : first_item.details['recurring'].to_i
|
||||
|
||||
params = {
|
||||
amount: payzen_amount(first_item.details['recurring'].to_i),
|
||||
amount: payzen_amount(amount),
|
||||
effect_date: first_item.due_date.iso8601,
|
||||
payment_method_token: token_id,
|
||||
rrule: rrule(payment_schedule, first_item.due_date),
|
||||
|
Loading…
Reference in New Issue
Block a user