SHARE
TWEET
Untitled
a guest
Jan 31st, 2017
94
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- \Stripe\Stripe::setApiKey($this->stripe_secret_key);
- if($currency == null)
- $currency = env('SITE_CURRENCY');
- $charge_data = [
- "amount" => $amount,
- "currency" => $currency,
- "source" => $card_token,
- "description" => $description,
- "application_fee" => $application_fee,
- 'destination' => $account_id
- ];
- try {
- Log::info("Charging CC: ". print_r($charge_data, true));
- $charge = \Stripe\Charge::create($charge_data);
- return $charge;
- }
- catch (\Exception $e) {
- Log::error("Fail Charge Connected Account:" . $e->getMessage());
- return false;
- }
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.
