show coupon expires date when user buys a coupon
This commit is contained in:
parent
4d0f6811b2
commit
c356c75494
|
@ -121,4 +121,7 @@ def coupon_route():
|
|||
PADDLE_VENDOR_ID=PADDLE_VENDOR_ID,
|
||||
PADDLE_COUPON_ID=PADDLE_COUPON_ID,
|
||||
can_use_coupon=can_use_coupon,
|
||||
# a coupon is only valid until this date
|
||||
# this is to avoid using the coupon to renew an account forever
|
||||
max_coupon_date=arrow.now().shift(years=1, days=-1),
|
||||
)
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
Can be an idea for a gift card :).
|
||||
After the payment, the coupon will be sent to you by email.
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
The coupon must be used before {{ max_coupon_date.date().isoformat() }}
|
||||
</div>
|
||||
<a href="#!" class="paddle_button btn btn-primary" data-product="{{ PADDLE_COUPON_ID }}">Buy 1-year SimpleLogin
|
||||
coupon</a>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue