mercredi 16 octobre 2019

Check if coupon exist - Laravel Cashier

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



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2BiRUf3
via IFTTT

Aucun commentaire:

Enregistrer un commentaire