Ejemplo n.º 1
0
 public function stripe_getCoupons()
 {
     $coupons = Stripe_Coupon::all();
     $res = [];
     foreach ($coupons['data'] as $coupon) {
         $res[] = $coupon;
     }
     return $res;
 }
 /**
  * List all active coupons
  */
 public function listAction()
 {
     \Stripe::setApiKey($this->container->getParameter('avro_stripe.secret_key'));
     $coupons = \Stripe_Coupon::all()->data;
     return $this->container->get('templating')->renderResponse('AvroStripeBundle:Coupon:list.html.twig', array('coupons' => $coupons));
 }