Cartalyst\Stripe\Api\Sources::create PHP Method

create() public method

Creates a new source on the given customer.
public create ( string $customerId, string | array $parameters = [] ) : array
$customerId string
$parameters string | array
return array
    public function create($customerId, $parameters = [])
    {
        if (is_array($parameters)) {
            $parameters['object'] = $this->sourceType;
        }
        $parameters = ['source' => $parameters];
        return $this->_post("customers/{$customerId}/sources", $parameters);
    }