我可以使用 Laravel Cachier(Stripe 提供商)将优惠券用于一次性收费吗?
Can I apply a coupon to a one time charge using Laravel Cachier (Stripe provider)?
我在 laravel 文档中看到优惠券可以应用于订阅。
$user->newSubscription('main', 'monthly')
->withCoupon('code')
->create($creditCardToken);
我想知道的是,优惠券可以用于一次性收费吗?
$user->charge(100);
优惠券不能用于一次性收费。它们仅适用于与订阅相关的发票。
您需要根据要申请的折扣计算收取的金额,并建立自己的优惠券系统。 Stripe 对此有一个食谱 here。
我在 laravel 文档中看到优惠券可以应用于订阅。
$user->newSubscription('main', 'monthly')
->withCoupon('code')
->create($creditCardToken);
我想知道的是,优惠券可以用于一次性收费吗?
$user->charge(100);
优惠券不能用于一次性收费。它们仅适用于与订阅相关的发票。
您需要根据要申请的折扣计算收取的金额,并建立自己的优惠券系统。 Stripe 对此有一个食谱 here。