laravel / cashier-mollie

MIT License
376 stars 63 forks source link

The times property of a coupon is not used #76

Closed sebastiaands closed 4 years ago

sebastiaands commented 4 years ago

In the cashier_coupons.php cofig file, you can set the times property. This property doesn't seem to be used. After applying a coupon with a times value higher than 1 the times_left column in the redeemed_coupons table is always 0 (or 1 before processing the order).

sandervanhooft commented 4 years ago

Thanks.

Can you check whether 1) this only happens on first payments, and 2) an AppliedCoupon record was created?

sebastiaands commented 4 years ago

This happens on both first payments and other payments. And an AppliedCoupon object is created.

sandervanhooft commented 4 years ago

Found it, the issue is in the ConfigCouponRepository. Preparing a PR.

sandervanhooft commented 4 years ago

@sebastiaands , can you give the develop branch a spin?

sandervanhooft commented 4 years ago

Should fix both of your issues.

sebastiaands commented 4 years ago

Hi @sandervanhooft , both issues seem to be fixed. Thanks!

sandervanhooft commented 4 years ago

Released! https://github.com/laravel/cashier-mollie/releases