Hi. I'm trying to build a form using multiform module and Stripe payment as the final step. The problem is, I still wish the user can go back to the previous step when they are in the final Stripe payment step. But if I enable can_go_back in the final step, when hitting submit, the form will go directly to the previous step without sending payment to Stripe. When I disable can_go_back (set value to false), the submission and payment work fine.
My guess is the way Stripe works (submit the form => create token => add hidden input with token value => submit again), the two submissions is confusing Multiform module. However, even if I disable can_go_back (so there is only one submit button), and manually add a link to the previous step, it still goes to the previous step without sending payment when hitting submit.
Here is what I used to get the previous step link:
public function PrevLink(){
$prevStepClass = $this->getCurrentStep()->getPreviousStep();
$prevStep = DataObject::get_one($prevStepClass, "\"SessionID\" = {$this->session->ID}");
$this->setCurrentStep($prevStep);
return $prevlink = $prevStep->Link();
}
Anyone has any ideas? Thanks!