MulitForm Builder
Created 7 years ago by jcastillotx

Ok so I am using a multiform builder that is called up in a controller IAW Ryan's guide. I am using the Users Stream and my custom stream Sponsorships.

So the steps in my code is that

saving_sponsorship: Here we take the form data and check to see if the credit card information is valid with api. If not it returns back to form with error message
-------
saved_user: If the form is good then it should save the user
-------
saved_sponsorship: Good API call where it saves the sponsorship information and links to that user

The issue I am having is that when the error returns back on the saving_sponsorship (I tried with posting and posted) it returns the message but creates the account. What I want it to do is return back for the user to be able to fix error and submit again. I do not want the user account created until a successful credit card transaction.

// Grab the response
$response = $client->authorizeTransaction( $api );

if ( $response['respstat'] != 'A' ) {

    $message->error( $response['resptext'] );

    return redirect()->back();
}

I have to save user first to complete the sponsorship stream.

jcastillotx  —  7 years ago

No love huh??