Before trying to create subscription in Stripe, I need to check the coupon exist using laravel cashier. I cannot see any function for that.
Tried to use stirpe-php library using below function. But it fails to check.
try {
\Stripe\Coupon::retrieve('free-period');
} catch(\Exception $e) {
echo "failed to check";
exit;
}
Tried using use Stripe; in top of the class
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire