Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre committed Nov 27, 2017
1 parent c03b2f9 commit 3f2f3d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/StripeConnect.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function createCustomer($token, $from, $params = [])
self::prepare();
$customer = self::getStripeModel($from);
if (!$customer->customer_id) {
$customer->account_id = Customer::create(array_merge([
$customer->customer_id = Customer::create(array_merge([
"email" => $from->email,
'source' => $token,
], $params))->id;
Expand All @@ -54,8 +54,8 @@ public static function createCustomer($token, $from, $params = [])
return $customer;
}

public static function transaction()
public static function transaction($token = null)
{
return new Transaction;
return new Transaction($token);
}
}
4 changes: 2 additions & 2 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public function create()
return \Stripe\Charge::create(array(
"amount" => $this->value,
"currency" => $this->currency,
"customer" => $customer->account_id,
"application_fee" => $this->fee ?? null,
"customer" => $customer->customer_id,
"destination" => array(
"account" => $vendor->account_id,
),
"application_fee" => $this->fee ?? null,
));
}
}

0 comments on commit 3f2f3d5

Please sign in to comment.