daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Jan 31st, 2017 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \Stripe\Stripe::setApiKey($this->stripe_secret_key);
  2.  
  3.         if($currency == null)
  4.             $currency = env('SITE_CURRENCY');
  5.            
  6.             $charge_data = [
  7.                     "amount" => $amount,
  8.                     "currency" => $currency,
  9.                     "source" => $card_token,
  10.                     "description" => $description,
  11.                     "application_fee" => $application_fee,
  12.                     'destination' => $account_id
  13.                     ];
  14.            
  15.         try {
  16.             Log::info("Charging CC: ". print_r($charge_data, true));
  17.            
  18.             $charge = \Stripe\Charge::create($charge_data);
  19.             return $charge;
  20.  
  21.         }
  22.         catch (\Exception $e) {
  23.  
  24.            Log::error("Fail Charge Connected Account:" . $e->getMessage());
  25.             return false;
  26.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top