public function showGetStripeData()
 {
     $user = User::find(1);
     $stripe = new StripeHelper($user);
     Log::info($stripe->calculateMRR(TRUE));
     return Redirect::route('development.testing_page');
 }
Esempio n. 2
0
 /**
  * Unify charges from PayPal and Stripe
  *
  * @return array of all customers
  */
 public static function getEvents($user)
 {
     // return array
     $allEvents = array();
     $stripeEvents = array();
     $paypalEvents = array();
     // get charges from Stripe if connected
     if ($user->isStripeConnected()) {
         $stripeEvents = StripeHelper::getEvents($user);
     }
     // get plans from Paypal if connected
     if ($user->isPayPalConnected()) {
         // getting api context
         $apiContext = PayPalHelper::getApiContext();
         $paypalPlans = PayPalHelper::getEvents($apiContext);
     }
     // merge the 2 arrays
     $allEvents = array_merge($stripeEvents, $paypalEvents);
     return $allEvents;
 }