1 week ago

Testing Spark Registration Route

Posted 1 week ago by snmd73

I literally never have any luck here, but here goes...

I'm trying to test Spark Registration, but it's not working. I have:

    public function testUserRegistration(array $overrideFields = []): TestResponse {
        $response = $this->post('/register', array_merge($this->userRegistrationData(), $overrideFields));

The error I'm getting is "The payment method you provided has already been attached to a user". The thing is, the payment method changes with each registration. I tried passing a random one and of course it doesn't work.

In this extremely outdated test, he seems to be calling $this->getStripeToken() and has a Class of InteractsWithPaymentProviders, but these seem to be deprecated as I can't access them.

Does anyone have any clue how to test these routes?

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