5 months ago

Integrating Affiliate program into Spark with Stripe Metadata

Posted 5 months ago by rchase

I can't find any info on how to submit metadata to Stripe when creating the Stripe customer.

I feel like it should be in /src/Interactions/SubscribeTeam.php

(Add ->withMetadata()) but it doesn't work


namespace Laravel\Spark\Interactions;

use Laravel\Spark\Spark;
use Illuminate\Support\Arr;
use Laravel\Spark\Contracts\Repositories\TeamRepository;
use Laravel\Spark\Events\Teams\Subscription\TeamSubscribed;
use Laravel\Spark\Contracts\Interactions\SubscribeTeam as Contract;

class SubscribeTeam implements Contract
     * {@inheritdoc}
    public function handle($team, $plan, $fromRegistration, array $data)
        $subscription = $team->newSubscription('default', $plan->id);
        $subscription->withMetadata(['property_id' => 'test']); 

Please sign in or create an account to participate in this conversation.